transformers-compat 0.3 → 0.3.2
raw patch · 5 files changed
+19/−27 lines, 5 filesdep ~transformers
Dependency ranges changed: transformers
Files
- 0.2/Control/Applicative/Backwards.hs +1/−5
- 0.2/Data/Functor/Reverse.hs +1/−4
- 0.3/Control/Monad/Trans/Except.hs +1/−6
- CHANGELOG.markdown +4/−0
- transformers-compat.cabal +12/−12
0.2/Control/Applicative/Backwards.hs view
@@ -22,11 +22,7 @@ -- | The same functor, but with an 'Applicative' instance that performs -- actions in the reverse order.-newtype Backwards f a = Backwards (f a)---- | Inverse of 'Backwards'.-forwards :: Backwards f a -> f a-forwards (Backwards x) = x+newtype Backwards f a = Backwards { forwards :: f a } -- | Derived instance. instance (Functor f) => Functor (Backwards f) where
0.2/Data/Functor/Reverse.hs view
@@ -26,10 +26,7 @@ -- | The same functor, but with 'Foldable' and 'Traversable' instances -- that process the elements in the reverse order.-newtype Reverse f a = Reverse (f a)--getReverse :: Reverse f a -> f a-getReverse (Reverse as) = as+newtype Reverse f a = Reverse { getReverse :: f a } -- | Derived instance. instance (Functor f) => Functor (Reverse f) where
0.3/Control/Monad/Trans/Except.hs view
@@ -28,7 +28,6 @@ withExcept, -- * The ExceptT monad transformer ExceptT(..),- runExceptT, mapExceptT, withExceptT, -- * Exception operations@@ -95,7 +94,7 @@ -- The 'return' function yields a computation that produces the given -- value, while @>>=@ sequences two subcomputations, exiting on the -- first exception.-newtype ExceptT e m a = ExceptT (m (Either e a))+newtype ExceptT e m a = ExceptT { runExceptT :: m (Either e a) } instance (Eq e, Eq1 m, Eq a) => Eq (ExceptT e m a) where ExceptT x == ExceptT y = eq1 x y@@ -113,10 +112,6 @@ instance (Ord e, Ord1 m) => Ord1 (ExceptT e m) where compare1 = compare instance (Read e, Read1 m) => Read1 (ExceptT e m) where readsPrec1 = readsPrec instance (Show e, Show1 m) => Show1 (ExceptT e m) where showsPrec1 = showsPrec---- | The inverse of 'ExceptT'.-runExceptT :: ExceptT e m a -> m (Either e a)-runExceptT (ExceptT m) = m -- | Map the unwrapped computation using the given function. --
CHANGELOG.markdown view
@@ -1,3 +1,7 @@+0.3.1+-----+* `transformers 0.4.1` compatibility+ 0.3 --- * Added the instances for `Data.Functor.Classes` from `transformers 0.4`
transformers-compat.cabal view
@@ -1,6 +1,6 @@ name: transformers-compat category: Compatibility-version: 0.3+version: 0.3.2 license: BSD3 cabal-version: >= 1.8 license-file: LICENSE@@ -39,11 +39,14 @@ flag transformers2 default: False- manual: False+ description: Use transformers 0.2. This must be selected manually and should+ probably only be used on older GHCs around 7.0.x.+ manual: True flag transformers3 default: False manual: False+ description: Use transformers 0.3. This should toggle on/off automatically. library build-depends:@@ -52,18 +55,15 @@ other-modules: Paths_transformers_compat - if flag(transformers2)- hs-source-dirs: 0.2 0.3- build-depends:- transformers >= 0.2 && < 0.3+ if flag(transformers3)+ hs-source-dirs: 0.3+ build-depends: transformers >= 0.3 && < 0.4 else- if flag(transformers3)- hs-source-dirs: 0.3- build-depends:- transformers >= 0.3 && < 0.4+ if flag(transformers2)+ hs-source-dirs: 0.2 0.3+ build-depends: transformers >= 0.2 && < 0.3 else- build-depends:- transformers >= 0.4 && < 0.5+ build-depends: transformers >= 0.4.1 && < 0.5 if flag(transformers2) exposed-modules: