[Template-haskell] Defining a function and using it in a splice within the same module

Alfonso Acosta alfonso.acosta at gmail.com
Thu Oct 25 07:49:32 EDT 2007


On 10/25/07, Simon Peyton-Jones <simonpj at microsoft.com> wrote:

> | where mkSysDef :: Name -> [String] -> [String] -> SysDef
>
> Ah I see.  Although you presumably meant
>         mkSysDef :: Name -> Q ([String] -> [String] -> SysDef)
> else it'd be ill-typed.

Yes, sure, sorry for the typo.

> | Since what I propossed is more "bypassing the problem" than a
> | workaround I don't know if its significant for the ticket.
>
> It's a nice illustration of why the proposed feature is useful.  I'd be happy if you added it.

I'll add it then.

Thanks,

Fons


More information about the template-haskell mailing list