Cafe,<br><br>I'm playing around with Template Haskell, specifically QuasiQuotes and I've run into something that I hope is not an inherent limitation in TH.<div><br></div><div>Specifically I want to get the type of a variable whose name is used in a QuasiQuote. The code generated by the QQ should depend on the type of the variables that are to be antiquoted.<br>
<br>For example <br><br>let a = True <br>in [qq | a |]</div><div><br>should result in different code being generated by the qq than</div><div><br>let a = 42<br>in [qq | a |] </div><div><br></div><div>because the type of variable "a" is different. </div>
<div><br></div><div>So far I've tried simple reification, but <br><br>> quote = do<br>>let varname = "someVariableKnownToExist"<br>info <- reify $ mkName str</div><div><br></div><div> <br><br></div>