
29 Mar
2009
29 Mar
'09
2:34 p.m.
Hi Stephan, Stephan Friedrichs wrote:
Hi,
when I tried to reorganize some code to use the data-accessor and data-accessor-template packages, i stumbled across a strange effect: When using template haskell some things are out of scope that really shouldn't be.
Apart from the specific problematic file you gave, I had some other scoping issues when using TH to generate the accessors. I worked around this by defining my data types in a separate module Types and calling the TH functions in that module as the last lines. Then I had my other modules import Types, bringing the types and the accessors back in scope. See: http://code.google.com/p/custard/source/browse/trunk/MudTypes.hs Hope this helps, Martijn.