dorchard / effect-monad

Provides 'graded monads' and 'parameterised monads' to Haskell, enabling fine-grained reasoning about effects.
BSD 2-Clause "Simplified" License
99 stars 11 forks source link

Fix compilation with GHC 8.0 and type-level-sets #5

Closed thomie closed 6 years ago

thomie commented 8 years ago

In GHC 8.0, Constraint is exported from GHC.Exts instead of GHC.Prim. See https://ghc.haskell.org/trac/ghc/ticket/11440 for details.

thomie commented 8 years ago

I tested the above two patches with ghc-7.10.3 and ghc-8.0.1-rc1.

To be clear, currently cabal install effect-monad doesn't work, so please release these fixes to hackage. Without the constraint on type-level-sets, I get:


Preprocessing library effect-monad-0.6.1...

src/Control/Effect/State.hs:4:14: Warning:
    -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
[ 1 of 17] Compiling Control.Effect.Helpers.List ( src/Control/Effect/Helpers/List.hs, dist/build/Control/Effect/Helpers/List.o )
[ 2 of 17] Compiling Control.Effect.Cond ( src/Control/Effect/Cond.hs, dist/build/Control/Effect/Cond.o )
[ 3 of 17] Compiling Control.Effect   ( src/Control/Effect.hs, dist/build/Control/Effect.o )
[ 4 of 17] Compiling Control.Effect.Counter ( src/Control/Effect/Counter.hs, dist/build/Control/Effect/Counter.o )
[ 5 of 17] Compiling Control.Effect.CounterNat ( src/Control/Effect/CounterNat.hs, dist/build/Control/Effect/CounterNat.o )
[ 6 of 17] Compiling Control.Effect.Maybe ( src/Control/Effect/Maybe.hs, dist/build/Control/Effect/Maybe.o )
[ 7 of 17] Compiling Control.Effect.Monad ( src/Control/Effect/Monad.hs, dist/build/Control/Effect/Monad.o )
[ 8 of 17] Compiling Control.Effect.Parameterised ( src/Control/Effect/Parameterised.hs, dist/build/Control/Effect/Parameterised.o )
[ 9 of 17] Compiling Control.Effect.Reader ( src/Control/Effect/Reader.hs, dist/build/Control/Effect/Reader.o )

src/Control/Effect/Reader.hs:33:8:
    Not in scope: type constructor or class ‘Var’

src/Control/Effect/Reader.hs:33:28:
    Not in scope: type constructor or class ‘:->’

src/Control/Effect/Reader.hs:34:5:
    Not in scope: data constructor ‘Var’

src/Control/Effect/Reader.hs:34:24:
    Not in scope: data constructor ‘Var’

src/Control/Effect/Reader.hs:34:28:
    Not in scope: data constructor ‘:->’
Failed to install effect-monad-0.6.1
thomie commented 6 years ago

Superseded by https://github.com/dorchard/effect-monad/pull/8.