No instance for <type family result type> in ghci command line
In the following code, Pred () no longer matches the instance for () from the GHCi command line, even though Pred () ~ ().
In 6.9.20071015 it still works, in 6.9.20071103 it no longer does.
{-# LANGUAGE TypeFamilies #-}
module Test where
x = reify (() :: Pred ())
type family Pred a
type instance Pred a = a
class Reify a where
reify :: a -> ()
instance Reify () where
reify _ = ()
The exact results:
GHCi, version 6.9.20071015:
*Test> x
()
*Test> reify (() :: Pred ())
()
GHCi, version 6.9.20071103:
*Test> x
()
*Test> reify (() :: Pred ())
<interactive>:1:0:
No instance for (Reify (Pred ()))
arising from a use of `reify' at <interactive>:1:0-20
Possible fix: add an instance declaration for (Reify (Pred ()))
In the expression: reify (() :: Pred ())
In the definition of `it': it = reify (() :: Pred ())
And, just for completeness, 6.8 shows the same regression:
GHCi, version 6.8.0.20071002:
*Test> x
()
*Test> reify (() :: Pred ())
()
GHCi, version 6.8.1.20071031:
*Test> x
()
*Test> reify (() :: Pred ())
<interactive>:1:0:
No instance for (Reify (Pred ()))
arising from a use of `reify' at <interactive>:1:0-20
Possible fix: add an instance declaration for (Reify (Pred ()))
In the expression: reify (() :: Pred ())
In the definition of `it': it = reify (() :: Pred ())
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.9 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | rturk@science.uva.nl |
| Operating system | Unknown |
| Architecture | Unknown |