Suggestion for module system (to get rid of many uses of unsafePerformIO)

2007-05-24 Thread oleg
Stephen Dolan wrote: > unsafePerformIO is possibly the most ugly feature of Haskell, yet is > necessary to do many things which should be possible without it, such > as reading configuration from a file at startup or creating global > IORefs There is a considerable debate about global mutable sta

Re: Suggestion for module system (to get rid of many uses of unsafePerformIO)

2007-05-23 Thread Adrian Hey
Stephen Dolan wrote: At the moment, we have the situation of modules using unsafePerformIO newIORef, which influences program behaviour without being referenced by main. Not really. Even with things as they currently are, if we have at the top level.. resultOfSomething = unsafePerformIO doSom

Re: Suggestion for module system (to get rid of many uses of unsafePerformIO)

2007-05-23 Thread Stephen Dolan
I think what you're describing seems to be so completely different from Haskell as it is now that that people either don't understand it, or they do understand it and do think it's downright silly, but are just too polite to say that. Maybe you should try writing it up in a more comprehensible for

Re: Suggestion for module system (to get rid of many uses of unsafePerformIO)

2007-05-23 Thread Adrian Hey
Stephen Dolan wrote: Would this be useful, useless, or just downright silly? The silence is deafening :-) I think what you're describing seems to be so completely different from Haskell as it is now that that people either don't understand it, or they do understand it and do think it's downri

Suggestion for module system (to get rid of many uses of unsafePerformIO)

2007-05-20 Thread Stephen Dolan
unsafePerformIO is possibly the most ugly feature of Haskell, yet is necessary to do many things which should be possible without it, such as reading configuration from a file at startup or creating global IORefs, e.g module Main where import Data.IORef a = unsafePerformIO $ newIORef 42 fac n = p