Hello

In the archives of haskell-cafe I found a mention of constraints on
datatypes as a mis-feature of Haskell. In particular, that they're not
propagated well. Can someone elaborate on that?

Also, are they still considered a mis-feature with the emergence of GADTs ?

If I have

data GADT a where
  ...
  Alt :: (a -> b -> c) -> GADT a -> GADT b -> GADT c
  ...

and I want to constrain all a, b, c.

Would it be better to expose all of them as type vars, rather than
constrain in-place? It would lead to a rather verbose code.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to