Ticket #1834: Bug.hs

File Bug.hs, 1.1 KB (added by guest, 7 years ago)
Line 
1{-# LANGUAGE TypeFamilies #-}
2module Test where
3
4x = reify (() :: Pred ())
5
6type family Pred a
7type instance Pred a = a
8
9class Reify a where
10    reify :: a -> ()
11
12instance Reify () where
13    reify _ = ()
14
15{-
16GHCi, version 6.9.20071015:
17*Test> x
18()
19*Test> reify (() :: Pred ())
20()
21
22
23GHCi, version 6.9.20071103:
24*Test> x
25()
26*Test> reify (() :: Pred ())
27
28<interactive>:1:0:
29    No instance for (Reify (Pred ()))
30      arising from a use of `reify' at <interactive>:1:0-20
31    Possible fix: add an instance declaration for (Reify (Pred ()))
32    In the expression: reify (() :: Pred ())
33    In the definition of `it': it = reify (() :: Pred ())
34
35
36GHCi, version 6.8.0.20071002:
37*Test> x
38()
39*Test> reify (() :: Pred ())
40()
41
42
43GHCi, version 6.8.1.20071031:
44*Test> x
45()
46*Test> reify (() :: Pred ())
47
48<interactive>:1:0:
49    No instance for (Reify (Pred ()))
50      arising from a use of `reify' at <interactive>:1:0-20
51    Possible fix: add an instance declaration for (Reify (Pred ()))
52    In the expression: reify (() :: Pred ())
53    In the definition of `it': it = reify (() :: Pred ())
54-}