template-haskell names in 6.3

MR K P SCHUPKE k.schupke at imperial.ac.uk
Fri Oct 22 08:05:17 EDT 2004


I have now read most of the notes on template-haskell2, but I still
have a problem with naming (although I think my issues with types
are adequately dealt with by the '' notation.

I wish to create a declaration in template haskell, where the funtion
name is supplied: something like:

$(label "myLabel")

However I wish the reference to this label to be globally specific
to the generated instance... an example of this would be a function
that prints its reified name:

$(example "myLabel") would splice:

myLabel :: String
myLabel = "This_module.myLabel"

mkName only returns the 'local' namem 
how can I get a global name from a string?

Keean.


More information about the Glasgow-haskell-users mailing list