ConstraintKinds lets you put the typechecker into a loop
Ed Kmett was playing with them the other day and Dan Doel and I reduced the issue to this:
{-# LANGUAGE ConstraintKinds, FlexibleContexts, FlexibleInstances, KindSignatures #-}
class C (p :: Constraint)
class D (p :: Constraint)
instance C (D p) => C (D (D p))
{-
-- This works
data E a = E
class F a
instance F (E a) => F (E (E a))
-}
Trac metadata
Trac field | Value |
---|---|
Version | 7.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (Type checker) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |