About the ConstraintKinds extension

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

On 18 October 2011 02:17, bob zhang
But I found a problem which I thought would be made better, plz correct me if I am wrong
For those who only subscribe to Haskell-Cafe, Bob posted a very similar thread to ghc-users, which I replied to here with a suggestion for how we could relax the superclass-cycle check: http://thread.gmane.org/gmane.comp.lang.haskell.glasgow.user/20828/focus=208... Max
participants (2)
-
bob zhang
-
Max Bolingbroke