ekmett / kan-extensions

Kan extensions, Kan lifts, the Yoneda lemma, and (co)monads generated by a functor
Other
79 stars 33 forks source link

GHC-7.8-rc2 imagines you need -XImpredicativeTypes #7

Closed michaelt closed 10 years ago

michaelt commented 10 years ago

I was installing this to get the Codensity module, and bumped into this nonsense. Curiously if I just do cabal configure and cabal build it doesn't complain. The compiler falls for this patch, but that's as much as I can claim for it.

Configuring kan-extensions-4.0.1... Building kan-extensions-4.0.1... Preprocessing library kan-extensions-4.0.1... [ 1 of 11] Compiling Data.Functor.Kan.Rift ( src/Data/Functor/Kan/Rift.hs, dist/build/Data/Functor/Kan/Rift.o ) [ 2 of 11] Compiling Data.Functor.Kan.Lift ( src/Data/Functor/Kan/Lift.hs, dist/build/Data/Functor/Kan/Lift.o )

src/Data/Functor/Kan/Lift.hs:50:27: Cannot instantiate unification variable ‘a0’ with a type involving foralls: forall x. h x -> g (z x) Perhaps you want ImpredicativeTypes In the first argument of ‘Lift’, namely ‘(fmap f . g)’ In the expression: Lift (fmap f . g) In an equation for ‘fmap’: fmap f (Lift g) = Lift (fmap f . g)

src/Data/Functor/Kan/Lift.hs:50:36: Cannot instantiate unification variable ‘a0’ with a type involving foralls: forall x. h x -> g (z x) Perhaps you want ImpredicativeTypes In the second argument of ‘(.)’, namely ‘g’ In the first argument of ‘Lift’, namely ‘(fmap f . g)’

src/Data/Functor/Kan/Lift.hs:66:10: Cannot instantiate unification variable ‘b0’ with a type involving foralls: forall a. f a -> g (z a) Perhaps you want ImpredicativeTypes In the expression: flip runLift In an equation for ‘toLift’: toLift = flip runLift

src/Data/Functor/Kan/Lift.hs:66:15: Cannot instantiate unification variable ‘b0’ with a type involving foralls: forall x. f x -> g (z x) Perhaps you want ImpredicativeTypes In the first argument of ‘flip’, namely ‘runLift’ In the expression: flip runLift