Regular expressions as Haskell Type Generators?
Steffen Mazanek
Steffen.Mazanek@UniBw-Muenchen.de
25 Feb 2003 17:12:08 +0000
Hello,
I am wondering if it would be worth while (and possible) to allow the
definition of types by regular expressions, e.g.
data Date = Date #RegExp([0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9])
or easier with some auxiliary constructs.
Clearly there would be some drawbacks with the use of standard
String-operations or type checking. But in praxi it may be
absolutely relevant.
Or is some work already done in this direction?
Ciao,
Steffen