Constraint and * should not be distinct in FC
With GHC 7.7 this program
class B a where
b :: a
newtype Additive a = Additive a
instance B a => B (Additive a) where
b = Additive b
produces a Core Lint error:
*** Core Lint errors : in result of Simplifier ***
{-# LINE 8 "T6117.hs #-}: Warning:
[RHS of T6117.$fBAdditive :: forall a_aeG.
T6117.B a_aeG =>
T6117.B (T6117.Additive a_aeG)]
Bad axiom application (check_ki2 Sym
(T6117.NTCo:B (T6117.NTCo:Additive <a_XeN>))
Constraint
a_aeF
*)
T6117.NTCo:B (Sym (T6117.NTCo:B (T6117.NTCo:Additive <a_XeN>)))
The reason is that while kinds Constraint
and *
should be distinct so far as the type inference engine is concerned, they should not be distinguished in Core, ie System FC.
This ticket is culled from #6117 (closed), which was really about something else.
Trac metadata
Trac field | Value |
---|---|
Version | 7.7 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | high |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |