packages feed

lifted-base 0.2.3.0 → 0.2.3.12

raw patch · 14 files changed

Files

Control/Concurrent/Chan/Lifted.hs view
@@ -3,7 +3,7 @@ {-# LANGUAGE FlexibleContexts #-}  #if __GLASGOW_HASKELL__ >= 702-{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE Safe #-} #endif  {- |
Control/Concurrent/Lifted.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE CPP, NoImplicitPrelude, FlexibleContexts, RankNTypes #-}  #if __GLASGOW_HASKELL__ >= 702-{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE Safe #-} #endif  {- |
Control/Concurrent/MVar/Lifted.hs view
@@ -4,7 +4,7 @@            , TupleSections #-}  #if __GLASGOW_HASKELL__ >= 702-{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE Safe #-} #endif  {- |
Control/Concurrent/QSem/Lifted.hs view
@@ -4,7 +4,7 @@ {-# LANGUAGE FlexibleContexts #-}  #if __GLASGOW_HASKELL__ >= 702-{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE Safe #-} #endif  {- |
Control/Concurrent/QSemN/Lifted.hs view
@@ -4,7 +4,7 @@ {-# LANGUAGE FlexibleContexts #-}  #if __GLASGOW_HASKELL__ >= 702-{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE Safe #-} #endif  {- |
Control/Exception/Lifted.hs view
@@ -1,15 +1,14 @@ {-# LANGUAGE CPP            , NoImplicitPrelude            , ExistentialQuantification-           , FlexibleContexts-           , ImpredicativeTypes #-}+           , FlexibleContexts #-}  #if MIN_VERSION_base(4,3,0) {-# LANGUAGE RankNTypes #-} -- for mask #endif  #if __GLASGOW_HASKELL__ >= 702-{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE Safe #-} #endif  {- |@@ -125,7 +124,7 @@                                    , liftBaseWith, restoreM                                    , control, liftBaseOp_                                    )-#if MIN_VERSION_base(4,3,0) || defined (__HADDOCK__)+#if defined (__HADDOCK__) import Control.Monad.Trans.Control ( liftBaseOp ) #endif @@ -265,23 +264,22 @@ #if MIN_VERSION_base(4,3,0) -- |Generalized version of 'E.mask'. mask :: MonadBaseControl IO m => ((forall a. m a -> m a) -> m b) -> m b-mask = liftBaseOp E.mask . liftRestore+mask f = control $ \runInBase ->+           E.mask $ \g -> runInBase $ f $ liftBaseOp_ g {-# INLINABLE mask #-} -liftRestore :: MonadBaseControl IO m-            => ((forall a.  m a ->  m a) -> b)-            -> ((forall a. IO a -> IO a) -> b)-liftRestore f r = f $ liftBaseOp_ r-{-# INLINE liftRestore #-}- -- |Generalized version of 'E.mask_'. mask_ :: MonadBaseControl IO m => m a -> m a mask_ = liftBaseOp_ E.mask_ {-# INLINABLE mask_ #-}  -- |Generalized version of 'E.uninterruptibleMask'.-uninterruptibleMask :: MonadBaseControl IO m => ((forall a. m a -> m a) -> m b) -> m b-uninterruptibleMask = liftBaseOp E.uninterruptibleMask . liftRestore+uninterruptibleMask+    :: MonadBaseControl IO m => ((forall a. m a -> m a) -> m b) -> m b+uninterruptibleMask f =+    control $ \runInBase ->+        E.uninterruptibleMask $ \g -> runInBase $ f $ liftBaseOp_ g+ {-# INLINABLE uninterruptibleMask #-}  -- |Generalized version of 'E.uninterruptibleMask_'.
Data/IORef/Lifted.hs view
@@ -2,8 +2,8 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE FlexibleContexts #-} -#if __GLASGOW_HASKELL__ >= 702-{-# LANGUAGE Trustworthy #-}+#if __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Safe #-} #endif  {- |
Foreign/Marshal/Utils/Lifted.hs view
@@ -2,7 +2,9 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE FlexibleContexts #-} -#if __GLASGOW_HASKELL__ >= 702+#if __GLASGOW_HASKELL__ >= 710+{-# LANGUAGE Safe #-}+#elif __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Trustworthy #-} #endif 
README.markdown view
@@ -1,3 +1,6 @@+[![Hackage](https://img.shields.io/hackage/v/lifted-base.svg)](https://hackage.haskell.org/package/lifted-base)+[![Build Status](https://travis-ci.org/basvandijk/lifted-base.svg)](https://travis-ci.org/basvandijk/lifted-base)+ IO operations from the base library lifted to any instance of `MonadBase` or `MonadBaseControl` 
System/Timeout/Lifted.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE CPP, NoImplicitPrelude, FlexibleContexts #-}  #if __GLASGOW_HASKELL__ >= 702-{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE Safe #-} #endif  -------------------------------------------------------------------------------
bench/bench.hs view
@@ -45,24 +45,28 @@   , b "bracket_"  benchBracket_ MP.bracket_  MC.bracket_   , b "catch"     benchCatch    MP.catch     MC.catch   , b "try"       benchTry      MP.try       MC.try-  , b "mask"      benchMask     mpMask       MC.mask +  , bgroup "mask"+    [ bench "monad-peel"    $ whnfIO $ benchMask mpMask+    , bench "monad-control" $ whnfIO $ benchMask MC.mask+    ]+   , bgroup "liftIOOp"-    [ bench "monad-peel"    $ exe $ MP.liftIOOp   (E.bracket nop (\_ -> nop))-                                                  (\_ -> nop)-    , bench "monad-control" $ exe $ MC.liftBaseOp (E.bracket nop (\_ -> nop))-                                                  (\_ -> nop)+    [ bench "monad-peel"    $ whnfIO $ exe $ MP.liftIOOp   (E.bracket nop (\_ -> nop))+                                                           (\_ -> nop)+    , bench "monad-control" $ whnfIO $ exe $ MC.liftBaseOp (E.bracket nop (\_ -> nop))+                                                           (\_ -> nop)     ]    , bgroup "liftIOOp_"-    [ bench "monad-peel"    $ exe $ MP.liftIOOp_   (E.bracket_ nop nop) nop-    , bench "monad-control" $ exe $ MC.liftBaseOp_ (E.bracket_ nop nop) nop+    [ bench "monad-peel"    $ whnfIO $ exe $ MP.liftIOOp_   (E.bracket_ nop nop) nop+    , bench "monad-control" $ whnfIO $ exe $ MC.liftBaseOp_ (E.bracket_ nop nop) nop     ]   ]  b name bnch peel mndCtrl = bgroup name-  [ bench "monad-peel"    $ bnch peel-  , bench "monad-control" $ bnch mndCtrl+  [ bench "monad-peel"    $ whnfIO $ bnch peel+  , bench "monad-control" $ whnfIO $ bnch mndCtrl   ]  --------------------------------------------------------------------------------
include/inlinable.h view
@@ -1,3 +1,3 @@-#if __GLASCOW_HASKELL__ < 700-#define INLINABLE INLINE +#if __GLASGOW_HASKELL__ < 700+#define INLINABLE INLINE #endif
lifted-base.cabal view
@@ -1,5 +1,5 @@ Name:                lifted-base-Version:             0.2.3.0+Version:             0.2.3.12 Synopsis:            lifted IO operations from the base library License:             BSD3 License-file:        LICENSE@@ -29,7 +29,7 @@  source-repository head   type:     git-  location: git://github.com/basvandijk/lifted-base.git+  location: https://github.com/basvandijk/lifted-base.git  -------------------------------------------------------------------------------- @@ -47,9 +47,9 @@     Exposed-modules:                    Control.Concurrent.SampleVar.Lifted -  Build-depends: base                 >= 3     && < 5-               , transformers-base    >= 0.4   && < 0.5-               , monad-control        >= 0.3   && < 0.4+  Build-depends: base              >= 3 && < 5+               , transformers-base >= 0.4+               , monad-control     >= 0.3    Include-dirs: include   Includes:     inlinable.h@@ -64,13 +64,14 @@   hs-source-dirs: test    build-depends: lifted-base-               , base                 >= 3     && < 5-               , transformers         >= 0.4   && < 0.5-               , transformers-base    >= 0.4   && < 0.5-               , monad-control        >= 0.3   && < 0.4-               , HUnit                >= 1.2.2 && < 1.3-               , test-framework       >= 0.2.4 && < 0.9-               , test-framework-hunit >= 0.2.4 && < 0.4+               , base                 >= 3 && < 5+               , transformers         >= 0.3+               , transformers-base    >= 0.4.4+               , transformers-compat  >= 0.3+               , monad-control        >= 1.0.0.3+               , HUnit                >= 1.2.2+               , test-framework       >= 0.2.4+               , test-framework-hunit >= 0.2.4    Include-dirs: include   Includes:     inlinable.h@@ -87,8 +88,8 @@   ghc-options:    -O2    build-depends: lifted-base-               , base          >= 3   && < 5-               , transformers  >= 0.2 && < 0.5-               , criterion     >= 0.5 && < 0.9-               , monad-control >= 0.3 && < 0.4-               , monad-peel    >= 0.1 && < 0.2+               , base          >= 3 && < 5+               , transformers  >= 0.2+               , criterion     >= 1+               , monad-control >= 0.3+               , monad-peel    >= 0.1
test/test.hs view
@@ -18,6 +18,7 @@ import Control.Monad.Trans.Reader import Control.Monad.Trans.Writer import Control.Monad.Trans.Except+ import Control.Monad.Trans.State import qualified Control.Monad.Trans.RWS as RWS