Cafe,<br><br>I&#39;m playing around with Template Haskell, specifically QuasiQuotes and I&#39;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 &quot;a&quot; is different. </div>
<div><br></div><div>So far I&#39;ve tried simple reification, but <br><br>&gt; quote = do<br>&gt;let varname = &quot;someVariableKnownToExist&quot;<br>info &lt;- reify $ mkName str</div><div><br></div><div> <br><br></div>