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.

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to