Skip to content

Instantly share code, notes, and snippets.

@NathanHowell
Created May 10, 2013 22:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NathanHowell/5557902 to your computer and use it in GitHub Desktop.
Save NathanHowell/5557902 to your computer and use it in GitHub Desktop.
{-# LANGUAGE FlexibleContexts #-}
import Control.Monad.Base
import Control.Monad.Trans.Control
import Control.Concurrent.MSem as MSem
withMSem :: (MonadBaseControl IO m, Integral i) => MSem i -> m a -> m a
withMSem = liftBaseOp_ . MSem.with
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment