
26 Sep
2002
26 Sep
'02
2:46 p.m.
Koen,
getConfig :: Configuration getConfig = unsafePerformIO $ do ...read configuration from file... return configuration
(*) Actually, a Haskell compiler is free to inline these kind of expressions, so really one has to give a NOINLINE pragma to the compiler as well.
I'd always avoided this type of thing precisely because of the inline issue, which I don't think my version is in danger of. That's just me, though :).