Template Haskell and unsafePerformIO

18 Oct
2008
18 Oct
'08
7:59 p.m.
Shouldn't be there some kind of way to run IO code once at the beginning of template processing? Something like a pair of templateInit :: IO a and templateData :: a where the a of both functions is the same and the latter is automagically generated by TH. Right now, I have to either use unsafePerformIO or runIO and IORef's to load a file only once. Both solutions aren't necessarily pretty. -- (c) this sig last receiving data processing entity. Inspect headers for copyright history. All rights reserved. Copying, hiring, renting, performance and/or quoting of this signature prohibited.
6058
Age (days ago)
6058
Last active (days ago)
0 comments
1 participants
participants (1)
-
Achim Schneider