Changes between Initial Version and Version 1 of Ticket #4429


Ignore:
Timestamp:
Oct 25, 2010 8:58:44 AM (5 years ago)
Author:
simonpj
Comment:

I think mkName is the wrong thing for you here. Fundamentally, you want to get the TH.Name of the data type called "Foo" that is currently in scope, yes? You could give that Name to reify, or you could use it in a type. Suppose we had

lookupType  :: String -> Q Name 
lookupValue :: String -> Q Name 

that were like mkName except that (a) they are monadic, and (a) they expect the string to be in scope. The would be the precise monadic equivalents of 'Foo and ''Foo. Would that do the job?

Anyone else have comments?

Simon

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4429 – Description

    initial v1  
    99
    1010(This is problematic, say, for a quasiquoter
    11 
    12 {{{ [qq| ... Foo ... |] }}}
     11{{{
     12[qq| ... Foo ... |]
     13}}}
    1314
    1415because the quasiquoter is forced to use {{{mkName "Foo"}}} as the {{{Name}}} for reify -- the forms {{{'Foo}}} and {{{''Foo}}} are unavailable to it.)