on master help sign in
GHC 8.0.1 compatibility (#17)
commit3977c8b71e7f9357d083ffe2fb6cd9dd96424dc0 authorIndex Int <vlad.z.4096@gmail.com> dateSat 30 Apr 2016, 13:23 (10 years ago) parenta0b36d7
7 files changed+66−11
.travis.yml+5−3 ether.cabal+4−4 src/Control/Ether/TH.hs+5 src/Control/Monad/Trans/Ether/Writer.hs+14−2 stack-ghc-7.8.4.yaml+1−1 stack-ghc-8.0.1.yaml+35 stack.yaml+2−1
.travis.yml+5−3
@@ -3,6 +3,7 @@ sudo: false
33env:
44 - GHCVER=7.8.4 STACK_YAML=stack-ghc-7.8.4.yaml
55 - GHCVER=7.10.3 STACK_YAML=stack.yaml COVERAGE="YES"
6+ - GHCVER=8.0.1 STACK_YAML=stack-ghc-8.0.1.yaml
67
78cache:
89 directories:
@@ -11,10 +12,11 @@ cache:
1112before_install:
1213 - export PATH=/opt/ghc/$GHCVER/bin:$PATH
1314 - 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− - mv stack-1.0.2-linux-x86_64/stack ~/.local/bin
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
16+ - mv stack-1.0.4.3-linux-x86_64/stack ~/.local/bin
1617 - export PATH=~/.local/bin:$PATH
1718 - stack --version
19+ - stack setup
1820
1921install:
2022 - stack install --only-dependencies --no-terminal
@@ -31,4 +33,4 @@ addons:
3133 - hvr-ghc
3234 packages:
3335 - ghc-7.8.4
34− - ghc-7.10.3
36+ - ghc-7.10.3
ether.cabal+4−4
@@ -1,5 +1,5 @@
11name: ether
2−version: 0.4.0.1
2+version: 0.4.0.2
33synopsis: Monad transformers and classes
44description:
55 Ether is a Haskell library that extends @mtl@ and @transformers@ with
@@ -58,9 +58,9 @@ library
5858
5959 other-modules: Control.Ether.Util
6060
61− build-depends: base >=4.7 && <4.9
61+ build-depends: base >=4.7 && <4.10
6262 , transformers >=0.4.2
63− , transformers-lift >=0.1
63+ , transformers-lift >=0.1.0.1
6464 , mtl >=2.2.1
6565 , mmorph >=1.0.4
6666 , monad-control >=1.0.0.4
@@ -90,7 +90,7 @@ library
9090
9191test-suite regression
9292
93− build-depends: base >=4.7 && <4.9
93+ build-depends: base >=4.7 && <4.10
9494 , transformers >=0.4.2
9595 , mtl >=2.2.1
9696 , tasty >=0.10
src/Control/Ether/TH.hs+5
@@ -1,4 +1,5 @@
11{-# LANGUAGE TemplateHaskell #-}
2+{-# LANGUAGE CPP #-}
23
34-- | Template Haskell utilities.
45
@@ -11,7 +12,11 @@ import qualified Language.Haskell.TH as TH
1112import Data.Proxy
1213
1314emptyDataDecl :: TH.Name -> TH.DecQ
15+#if __GLASGOW_HASKELL__ < 800
1416emptyDataDecl name = TH.dataD (return []) name [] [] []
17+#else
18+emptyDataDecl name = TH.dataD (return []) name [] Nothing [] (return [])
19+#endif
1520
1621funSimple :: TH.Name -> TH.ExpQ -> TH.DecQ
1722funSimple 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 ()
8484tell t w = writer t ((), w)
8585
8686-- | Executes an action and adds its accumulator to the value of the computation.
87−listen :: (Monoid w, Monad m) => proxy tag -> WriterT tag w m a -> WriterT tag w m (a, w)
87+listen
88+#if __GLASGOW_HASKELL__ < 800
89+ :: (Monad m, Monoid w)
90+#else
91+ :: Monad m
92+#endif
93+ => proxy tag -> WriterT tag w m a -> WriterT tag w m (a, w)
8894listen _ = pack . Trans.listen . unpack
8995
9096-- | Executes an action which returns a value and a function, and returns the
9197-- value, applying the function to the accumulator.
92−pass :: (Monoid w, Monad m) => proxy tag -> WriterT tag w m (a, w -> w) -> WriterT tag w m a
98+pass
99+#if __GLASGOW_HASKELL__ < 800
100+ :: (Monad m, Monoid w)
101+#else
102+ :: Monad m
103+#endif
104+ => proxy tag -> WriterT tag w m (a, w -> w) -> WriterT tag w m a
93105pass _ = pack . Trans.pass . unpack
stack-ghc-7.8.4.yaml+1−1
@@ -29,7 +29,7 @@ extra-deps:
2929- transformers-0.4.3.0
3030- transformers-base-0.4.4
3131- transformers-compat-0.4.0.4
32−- transformers-lift-0.1.0.0
32+- transformers-lift-0.1.0.1
3333- unbounded-delays-0.1.0.9
3434- exceptions-0.8.0.2
3535resolver: 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 @@
11flags: {}
22packages:
33- '.'
4−extra-deps: []
4+extra-deps:
5+- transformers-lift-0.1.0.1
56resolver: lts-5.0