[Haskell-cafe] Data.Generics question

Neil Mitchell ndmitchell at gmail.com
Tue Dec 19 09:53:01 EST 2006


Hi Mark,

> nested type, but to do that I seem to have to create a whole other
> near-copy of the data declarations with slightly different names and the
> occasional constructor missing. I wonder if there's a better way.

Instead of getting the type system to enforce it, you can write
annotations that capture this restricted type.

See:

http://www.cl.cam.ac.uk/~nx200/research/escH-hw.ps

http://www-users.cs.york.ac.uk/~ndm/projects/catch.php

Note that neither of these tools are publically available, but I
suspect both will be within a year or so. I'm hoping Catch will be
much sooner.

Thanks

Neil


More information about the Haskell-Cafe mailing list