[Haskell-cafe] Re: [Haskell] pros and cons of static typing and side effects ?

2005-08-27 Thread Martin Vlk
Hi folks, have you read this paper: http://www-i2.informatik.rwth-aachen.de/Staff/Current/michaelw/sttt-ml-haskell.pdf It contains descriptions of lots of real-world problems and how easily they are solved with Haskell (and ML, because the paper compares the two languages). Among other things

Re: [Haskell-cafe] How to use STArray?

2005-08-27 Thread Remi Turk
On Fri, Aug 26, 2005 at 08:27:43PM -0400, ChrisK wrote: to figure out since there was no Data.Array.ST.Lazy. Does anyone know why it was left out? I'll put a note on the HaskellTwo page about that... Some time ago when I wanted a lazy hashtable I came up with this, which, after minimal

[Haskell-cafe] Comtrol.Monad.when

2005-08-27 Thread Juan Carlos Arevalo Baeza
Any reason why Control.Monad.when :: Monad Control.Monad.html#t%3AMonad m = Bool Data.Bool.html#t%3ABool - m () - m () doesn't have type Monad Control.Monad.html#t%3AMonad m = Bool Data.Bool.html#t%3ABool - m a - m () instead? Just seems a bit of a waste to have the restriction without

Re: [Haskell-cafe] How to use STArray?

2005-08-27 Thread Benjamin Franksen
On Thursday 25 August 2005 19:58, Udo Stenzel wrote: [...] you'll need a type signature somewhere to help ghc resolve the overloading of newArray and readArray, which is surprisingly tricky due to the s that must not escape. This works: compute :: Int - Int compute n = runST ( do arr -