Hi cafe,
I have played quite a bit with the ConstraintKinds extension, pretty cool.
But I found a problem which I thought would be made better, plz correct me if I am wrong
take a contrived example,
class C B => B a where
here B :: * -> Constraint, I think this definition is reasonable, since B does not appears in the
first position of the context.
Previously, we require acyclic class declarations since we don't have ConstraintKinds extension
but now since type class could be abstracted, I think the definition above should be ok.
the ghc-manual cited the program below is valid
class C a where {
op :: D b => a -> b -> b
}
class C a => D a where { ... }
I think there are no reasons to reject
class C B => B where (and this style is pretty useful in some cases)
...
B :: * -> Constraint
C :: (*->Constraint) -> Constraint
Any comments are welcome
--
Best, bob