on master help sign in
Bumped transformers version
e950d6eMichael Snoyman
Text/Libyaml.hs+5
@@ -7,6 +7,7 @@
7{-# LANGUAGE PackageImports #-}
7{-# LANGUAGE PackageImports #-}
8{-# LANGUAGE GeneralizedNewtypeDeriving #-}
8{-# LANGUAGE GeneralizedNewtypeDeriving #-}
9{-# LANGUAGE RankNTypes #-}
9{-# LANGUAGE RankNTypes #-}
10+{-# LANGUAGE CPP #-}
10
11
11module Text.Libyaml
12module Text.Libyaml
12 ( -- * The event stream
13 ( -- * The event stream
@@ -45,7 +46,11 @@ import Foreign.C
45import Foreign.Ptr
46import Foreign.Ptr
46import Foreign.ForeignPtr
47import Foreign.ForeignPtr
47import Foreign.Marshal.Alloc
48import Foreign.Marshal.Alloc
49+#if MIN_VERSION_transformers(0,2,0)
50+import "transformers" Control.Monad.IO.Class
51+#else
48import "transformers" Control.Monad.Trans
52import "transformers" Control.Monad.Trans
53+#endif
49import Control.Monad.Failure.Transformers
54import Control.Monad.Failure.Transformers
50import qualified Control.Monad.Trans.Error as ErrorT
55import qualified Control.Monad.Trans.Error as ErrorT
51import Control.Monad.Trans.Reader
56import Control.Monad.Trans.Reader
runtests.hs+7−1
@@ -1,8 +1,14 @@
1+{-# LANGUAGE CPP #-}
2+{-# LANGUAGE PackageImports #-}
1import Test.Framework (defaultMain)
3import Test.Framework (defaultMain)
2
4
3import Text.Libyaml
5import Text.Libyaml
4import qualified Data.ByteString.Char8 as B8
6import qualified Data.ByteString.Char8 as B8
7+#if MIN_VERSION_transformers(0,2,0)
8+import "transformers" Control.Monad.Trans.Class
9+#else
5−import Control.Monad.Trans
10+import "transformers" Control.Monad.Trans
11+#endif
6
12
7--import Test.Framework (testGroup, Test)
13--import Test.Framework (testGroup, Test)
8import Test.Framework.Providers.HUnit
14import Test.Framework.Providers.HUnit
yaml.cabal+2−15
@@ -18,17 +18,10 @@ extra-source-files: c/helper.h,
18flag buildtests
18flag buildtests
19 description: Build the executable to run unit tests
19 description: Build the executable to run unit tests
20 default: False
20 default: False
21−flag nolib
22− description: Skip building of the library
23− default: False
24
21
25library
22library
26− if flag(nolib)
27− Buildable: False
28− else
29− Buildable: True
30 build-depends: base >= 4 && < 5,
23 build-depends: base >= 4 && < 5,
31− transformers >= 0.1 && < 0.2,
24+ transformers >= 0.1 && < 0.3,
32 control-monad-failure >= 0.6.0 && < 0.7,
25 control-monad-failure >= 0.6.0 && < 0.7,
33 bytestring >= 0.9.1.4 && < 0.10
26 bytestring >= 0.9.1.4 && < 0.10
34 exposed-modules: Text.Libyaml
27 exposed-modules: Text.Libyaml
@@ -49,14 +42,8 @@ executable runtests
49 Buildable: True
42 Buildable: True
50 cpp-options: -DTEST
43 cpp-options: -DTEST
51 build-depends: test-framework,
44 build-depends: test-framework,
52− test-framework-quickcheck,
53 test-framework-hunit,
45 test-framework-hunit,
54− HUnit,
46+ HUnit
55− QuickCheck >= 1 && < 2,
56− base >= 4 && < 5,
57− transformers >= 0.1 && < 0.2,
58− control-monad-failure >= 0.6.0 && < 0.7,
59− bytestring >= 0.9.1.4 && < 0.10
60 else
47 else
61 Buildable: False
48 Buildable: False
62 ghc-options: -Wall
49 ghc-options: -Wall