[Template-haskell] Re: template-haskell names in 6.3

Keean Schupke k.schupke at imperial.ac.uk
Fri Dec 3 07:21:05 EST 2004


Simon Peyton-Jones wrote:

>Reasonable idea.  I've added
>
>	nameModule :: Name -> Maybe String
>to join the existing
>	nameBase :: Name -> String
>
>The 'Maybe' is needed because not all names  have modules; in
>particular, ones that are made with mkName or newName.
>
>OK?
>  
>
That looks great - one final request is there any problems with exporting
a generic constructor for these two part Names... like:

    mkNameG :: String -> String -> Name

    or perhaps

    makeName :: Maybe String -> String -> Name

       which would make either a local name or a global name depending
       on whether a module name were specified...

Keean.



More information about the template-haskell mailing list