Commit 458673e8 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Test Trac #5853

parent 1d9f4918
{-# LANGUAGE NoImplicitPrelude, TypeFamilies #-}
module T5853 where
import Prelude (undefined,Bool(..),Show(..),(.))
type family Elem f :: *
type family Subst f b :: *
class (Subst fa (Elem fa) ~ fa) => F fa where
(<$>) :: (Elem fa ~ a, Elem fb ~ b,
Subst fa b ~ fb, Subst fb a ~ fa) =>
(a -> b) -> (fa -> fb)
"map/map" forall f g xs. f <$> (g <$> xs) = (f.g) <$> xs
Could not deduce (fb ~ Subst fa1 (Elem fb))
from the context (F fa,
Subst fa (Elem fb) ~ fb,
Subst fb (Elem fa) ~ fa,
F fa1,
Subst fa1 (Elem fa) ~ fa,
Subst fa (Elem fa1) ~ fa1)
bound by the RULE "map/map" at T5853.hs:15:2-57
`fb' is a rigid type variable bound by
the RULE "map/map" at T5853.hs:15:2
In the expression: (f . g) <$> xs
When checking the transformation rule "map/map"
......@@ -273,3 +273,4 @@ test('T5684', normal, compile_fail, [''])
test('T5858', normal, compile_fail, [''])
test('T5957', normal, compile_fail, [''])
test('T6001', normal, compile_fail, [''])
test('T5853', normal, compile_fail, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment