on master help sign in
GHC 8.0.1 compatibility (#17)
3977c8bIndex Int
.travis.yml+5−3
@@ -3,6 +3,7 @@ sudo: false
3env:
3env:
4 - GHCVER=7.8.4 STACK_YAML=stack-ghc-7.8.4.yaml
4 - GHCVER=7.8.4 STACK_YAML=stack-ghc-7.8.4.yaml
5 - GHCVER=7.10.3 STACK_YAML=stack.yaml COVERAGE="YES"
5 - GHCVER=7.10.3 STACK_YAML=stack.yaml COVERAGE="YES"
6+ - GHCVER=8.0.1 STACK_YAML=stack-ghc-8.0.1.yaml
6
7
7cache:
8cache:
8 directories:
9 directories:
@@ -11,10 +12,11 @@ cache:
11before_install:
12before_install:
12 - export PATH=/opt/ghc/$GHCVER/bin:$PATH
13 - export PATH=/opt/ghc/$GHCVER/bin:$PATH
13 - mkdir -p ~/.local/bin
14 - mkdir -p ~/.local/bin
14− - travis_retry curl -L https://github.com/commercialhaskell/stack/releases/download/v1.0.2/stack-1.0.2-linux-x86_64.tar.gz | tar -xvz
15+ - travis_retry curl -L https://github.com/commercialhaskell/stack/releases/download/v1.0.4.3/stack-1.0.4.3-linux-x86_64.tar.gz | tar -xvz
15− - mv stack-1.0.2-linux-x86_64/stack ~/.local/bin
16+ - mv stack-1.0.4.3-linux-x86_64/stack ~/.local/bin
16 - export PATH=~/.local/bin:$PATH
17 - export PATH=~/.local/bin:$PATH
17 - stack --version
18 - stack --version
19+ - stack setup
18
20
19install:
21install:
20 - stack install --only-dependencies --no-terminal
22 - stack install --only-dependencies --no-terminal
@@ -31,4 +33,4 @@ addons:
31 - hvr-ghc
33 - hvr-ghc
32 packages:
34 packages:
33 - ghc-7.8.4
35 - ghc-7.8.4
34− - ghc-7.10.3
36+ - ghc-7.10.3
ether.cabal+4−4
@@ -1,5 +1,5 @@
1name: ether
1name: ether
2−version: 0.4.0.1
2+version: 0.4.0.2
3synopsis: Monad transformers and classes
3synopsis: Monad transformers and classes
4description:
4description:
5 Ether is a Haskell library that extends @mtl@ and @transformers@ with
5 Ether is a Haskell library that extends @mtl@ and @transformers@ with
@@ -58,9 +58,9 @@ library
58
58
59 other-modules: Control.Ether.Util
59 other-modules: Control.Ether.Util
60
60
61− build-depends: base >=4.7 && <4.9
61+ build-depends: base >=4.7 && <4.10
62 , transformers >=0.4.2
62 , transformers >=0.4.2
63− , transformers-lift >=0.1
63+ , transformers-lift >=0.1.0.1
64 , mtl >=2.2.1
64 , mtl >=2.2.1
65 , mmorph >=1.0.4
65 , mmorph >=1.0.4
66 , monad-control >=1.0.0.4
66 , monad-control >=1.0.0.4
@@ -90,7 +90,7 @@ library
90
90
91test-suite regression
91test-suite regression
92
92
93− build-depends: base >=4.7 && <4.9
93+ build-depends: base >=4.7 && <4.10
94 , transformers >=0.4.2
94 , transformers >=0.4.2
95 , mtl >=2.2.1
95 , mtl >=2.2.1
96 , tasty >=0.10
96 , tasty >=0.10
src/Control/Ether/TH.hs+5
@@ -1,4 +1,5 @@
1{-# LANGUAGE TemplateHaskell #-}
1{-# LANGUAGE TemplateHaskell #-}
2+{-# LANGUAGE CPP #-}
2
3
3-- | Template Haskell utilities.
4-- | Template Haskell utilities.
4
5
@@ -11,7 +12,11 @@ import qualified Language.Haskell.TH as TH
11import Data.Proxy
12import Data.Proxy
12
13
13emptyDataDecl :: TH.Name -> TH.DecQ
14emptyDataDecl :: TH.Name -> TH.DecQ
15+#if __GLASGOW_HASKELL__ < 800
14emptyDataDecl name = TH.dataD (return []) name [] [] []
16emptyDataDecl name = TH.dataD (return []) name [] [] []
17+#else
18+emptyDataDecl name = TH.dataD (return []) name [] Nothing [] (return [])
19+#endif
15
20
16funSimple :: TH.Name -> TH.ExpQ -> TH.DecQ
21funSimple :: TH.Name -> TH.ExpQ -> TH.DecQ
17funSimple name body = TH.funD name [ TH.clause [] (TH.normalB body) [] ]
22funSimple name body = TH.funD name [ TH.clause [] (TH.normalB body) [] ]
src/Control/Monad/Trans/Ether/Writer.hs+14−2
@@ -84,10 +84,22 @@ tell :: Monad m => proxy tag -> w -> WriterT tag w m ()
84tell t w = writer t ((), w)
84tell t w = writer t ((), w)
85
85
86-- | Executes an action and adds its accumulator to the value of the computation.
86-- | Executes an action and adds its accumulator to the value of the computation.
87+listen
88+#if __GLASGOW_HASKELL__ < 800
89+ :: (Monad m, Monoid w)
90+#else
91+ :: Monad m
92+#endif
87−listen :: (Monoid w, Monad m) => proxy tag -> WriterT tag w m a -> WriterT tag w m (a, w)
93+ => proxy tag -> WriterT tag w m a -> WriterT tag w m (a, w)
88listen _ = pack . Trans.listen . unpack
94listen _ = pack . Trans.listen . unpack
89
95
90-- | Executes an action which returns a value and a function, and returns the
96-- | Executes an action which returns a value and a function, and returns the
91-- value, applying the function to the accumulator.
97-- value, applying the function to the accumulator.
98+pass
99+#if __GLASGOW_HASKELL__ < 800
100+ :: (Monad m, Monoid w)
101+#else
102+ :: Monad m
103+#endif
92−pass :: (Monoid w, Monad m) => proxy tag -> WriterT tag w m (a, w -> w) -> WriterT tag w m a
104+ => proxy tag -> WriterT tag w m (a, w -> w) -> WriterT tag w m a
93pass _ = pack . Trans.pass . unpack
105pass _ = pack . Trans.pass . unpack
stack-ghc-7.8.4.yaml+1−1
@@ -29,7 +29,7 @@ extra-deps:
29- transformers-0.4.3.0
29- transformers-0.4.3.0
30- transformers-base-0.4.4
30- transformers-base-0.4.4
31- transformers-compat-0.4.0.4
31- transformers-compat-0.4.0.4
32−- transformers-lift-0.1.0.0
32+- transformers-lift-0.1.0.1
33- unbounded-delays-0.1.0.9
33- unbounded-delays-0.1.0.9
34- exceptions-0.8.0.2
34- exceptions-0.8.0.2
35resolver: ghc-7.8.4
35resolver: ghc-7.8.4
stack-ghc-8.0.1.yamlnew file+35
@@ -0,0 +1,35 @@
1+packages:
2+- '.'
3+extra-deps:
4+- QuickCheck-2.8.2
5+- ansi-terminal-0.6.2.3
6+- ansi-wl-pprint-0.6.7.3
7+- async-2.1.0
8+- clock-0.7.2
9+- exceptions-0.8.2.1
10+- mmorph-1.0.6
11+- monad-control-1.0.1.0
12+- mtl-2.2.1
13+- optparse-applicative-0.12.1.0
14+- parsec-3.1.9
15+- primitive-0.6.1.0
16+- random-1.1
17+- regex-base-0.93.2
18+- regex-tdfa-1.2.2
19+- stm-2.4.4.1
20+- tagged-0.8.4
21+- tasty-0.11.0.3
22+- tasty-quickcheck-0.8.4
23+- text-1.2.2.1
24+- tf-random-0.5
25+- transformers-base-0.4.4
26+- transformers-compat-0.5.1.4
27+- transformers-lift-0.1.0.1
28+- unbounded-delays-0.1.0.9
29+compiler-check: match-exact
30+resolver: ghc-8.0.0.20160421
31+setup-info:
32+ ghc:
33+ linux64:
34+ 8.0.0.20160421:
35+ url: https://downloads.haskell.org/~ghc/8.0.1-rc4/ghc-8.0.0.20160421-x86_64-unknown-linux.tar.xz
stack.yaml+2−1
@@ -1,5 +1,6 @@
1flags: {}
1flags: {}
2packages:
2packages:
3- '.'
3- '.'
4−extra-deps: []
4+extra-deps:
5+- transformers-lift-0.1.0.1
5resolver: lts-5.0
6resolver: lts-5.0