Browse files

Support for transformers 0.1.* added back

  • Loading branch information...
1 parent 26e1d7d commit a9098549ea8ec15ac7028045e4c130656b6a4f1b @snoyberg committed Apr 25, 2010
Showing with 14 additions and 2 deletions.
  1. +5 −0 Control/Monad/Attempt.hs
  2. +9 −2 control-monad-attempt.cabal
View
5 Control/Monad/Attempt.hs
@@ -1,6 +1,7 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE Rank2Types #-}
+{-# LANGUAGE CPP #-}
---------------------------------------------------------
--
-- Module : Control.Monad.Attempt
@@ -26,8 +27,12 @@ module Control.Monad.Attempt
import Data.Attempt
import Control.Applicative
import Control.Monad
+#if TRANSFORMERS_02
import Control.Monad.Trans.Class
import Control.Monad.IO.Class
+#else
+import Control.Monad.Trans
+#endif
import Control.Exception (Exception)
newtype AttemptT m v = AttemptT {
View
11 control-monad-attempt.cabal
@@ -1,5 +1,5 @@
name: control-monad-attempt
-version: 0.2.0
+version: 0.2.0.1
license: BSD3
license-file: LICENSE
author: Michael Snoyman, Nicolas Pouillard
@@ -12,10 +12,17 @@ cabal-version: >= 1.2
build-type: Simple
homepage: http://github.com/snoyberg/control-monad-attempt
+flag transformers_02
+ description: transformers = 0.2.*
+
library
build-depends: base >= 4 && < 5,
syb,
- transformers >= 0.2 && < 0.3,
attempt >= 0.2.2 && < 0.3
exposed-modules: Control.Monad.Attempt
+ if flag(transformers_02)
+ build-depends: transformers >= 0.2 && < 0.3
+ CPP-OPTIONS: -DTRANSFORMERS_02
+ else
+ build-depends: transformers >= 0.1 && < 0.2
ghc-options: -Wall

0 comments on commit a909854

Please sign in to comment.