[Haskell-cafe] Regular Expressions without GADTs

Ralf Hinze ralf at informatik.uni-bonn.de
Tue Oct 18 01:43:54 EDT 2005

> The code seems a bit simpler, too.

Do you really think so? To me replacing a GADT by class and
instance declarations seems the wrong way round. We should
not forget that the DT in GADT stands for `data type'. One
could certainly argue that the gist of functional programming
is to define a collection of data types and functions that
operate on these types. The fact that with GADTs constructors
can have more general types just allows us to use the functional
design pattern more often (freeing us from the need or temptation
to resort to type class hackery with multiple parameter type
classes, undecidable instances, functional dependencies etc).

Cheers, Ralf

More information about the Haskell-Cafe mailing list