[Haskell-cafe] Why were datatype contexts removed instead of "fixing them"?

harry voldermort at hotmail.com
Thu Apr 25 16:42:45 CEST 2013

Brandon Allbery <allbery.b <at> gmail.com> writes:

> As I understand it, it's because fixing them involves passing around a
dictionary along with the data, and you can't do that with a standard
declaration (it amounts to an extra chunk of data that's only *sometimes*
wanted, and that "sometimes" complicates things). GADTs already have to pass
around extra data in order to support their constructors and destructors;
and, being new and not part of the standard, they don't have backward
compatibility or standards compatibility issues, so they can get away with
including the extra dictionary without breaking existing programs.

But you can't do this with GADTs either?

More information about the Haskell-Cafe mailing list