[Template-haskell] Reification of local names
Ian Lynagh
igloo at earth.li
Tue Jun 22 10:26:48 EDT 2004
On Mon, Jun 21, 2004 at 05:52:04PM +0100, Simon Peyton-Jones wrote:
>
> One idea: add (Maybe Type) fields to many TH syntax forms, where the
> type checker can record types. That's simple and direct.
>
> A general question to TH aficionados: would this be useful? Remember
> that the type may not be fully precise, because it's the result of
> type-checking an as-yet-unspliced fragment.
I know almost nothing about views, but would they allow us to treat a
datatype with (Maybe Type)s as either one with Types or one identical to
what we currently have, at our choice?
I think there are probably cases where we will have to lose type info
when we manipulate datastructures in the second view, but overall I
think this could work well.
I don't relish the thought of having to sprinkle Nothings liberally over
my code.
Thanks
Ian
More information about the template-haskell
mailing list