Hi,<br><br>In ghci, if you change a module that exports a TH template it will not recompile modules that use the template. Example:<br><br>-- In A.hs<br>{-#LANGUAGE TemplateHaskell#-}<br>module A where<br>import <a href="http://Language.Haskell.TH">Language.Haskell.TH</a><br>
a = [d|x = 5|]<br><br>-- in B.hs<br>{-#LANGUAGE TemplateHaskell#-}<br>import A<br>a<br><br>-- As expected in ghci B.hs:<br>*Main&gt; x<br>5<br><br>-- But if i change the def. of a to [d|x = 4|] and do :r <br>[1 of 2] Compiling A ( A.hs, interpreted )<br>
Ok, modules loaded: A, Main.<br>*Main&gt; x<br>5<br><br>The only workaround i know is to reload all modules. I assume you have the same problem when compiling with ghc. This has caused headaches for me on several occasions lately, is there a ticket for it or should i submit one?<br>
<br>Regards,<br>Jonas<br>