[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 13:53:07 EDT 2007
On 10/25/07, Alfonso Acosta <alfonso.acosta at gmail.com> wrote:
> 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.
Actually mkSysDef :: Name -> Q ([String] -> [String] -> SysDef) would
also be ill-typed,
it should be mkSysDef :: Name -> ExpQ.
> > 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.
done
More information about the template-haskell
mailing list