haskell-cafe@haskell.org
[Top] [All Lists]

[Haskell-cafe] Constraints on data-types, mis-feature?

Subject: [Haskell-cafe] Constraints on data-types, mis-feature?
From: "Daniil Elovkov"
Date: Mon, 9 Jul 2007 12:12:06 +0400
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@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>