tryWaitSignal :: Signal -> IO Bool
tryWaitSignal var =
  do mb <- tryTakeMVar var
     case mb of
       Just () -> return True
       Nothing -> return False
tryWaitSignal :: Signal -> IO Bool
tryWaitSignal var =
  do mb <- tryTakeMVar var
     case mb of
       Just () -> return True
       Nothing -> return False
tryWaitSignal var =
  do mb <- tryTakeMVar var
     case mb of
       Just () -> return True
       Nothing -> return False