[Haskell-cafe] Re: strict Haskell dialect
John Meacham [EMAIL PROTECTED] writes: there are actually several ways to implement IO. There is a paper about it somewhere that explores various methods, but I can't seem to find it, does anyone know which one i am thinking of? I know it at least explores the state and continuation versions as well as some that don't use monads I thought. It was either part of a general paper on monads or something specific to doing IO... This one? http://research.microsoft.com/~simonpj/Papers/imperative.ps.Z ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: strict Haskell dialect
On Wed, Feb 15, 2006 at 04:58:34PM +0100, Johan Bockgård wrote: John Meacham [EMAIL PROTECTED] writes: there are actually several ways to implement IO. There is a paper about it somewhere that explores various methods, but I can't seem to find it, does anyone know which one i am thinking of? I know it at least explores the state and continuation versions as well as some that don't use monads I thought. It was either part of a general paper on monads or something specific to doing IO... This one? http://research.microsoft.com/~simonpj/Papers/imperative.ps.Z Ah, yes. perhaps we could get a local copy of every paper somewhere on haskell.org so we can do a scholar.google.com search with site:haskell.org to get full text search of all relevant haskell papers. John -- John Meacham - ⑆repetae.net⑆john⑈ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: strict Haskell dialect
Chris Kuklewicz wrote: Weak uses seq to achieve WHNF for it's argument newtype Weak a = WeakCon {runWeak :: a} mkWeak x = seq x (WeakCon x) unsafeMkWeak x = WeakCon x This doesn't actually do what you think it does. mkWeak and unsafeMkWeak are the same function. mkWeak 123 = seq 123 (WeakCon 123) = WeakCon 123 unsafeMkWeak 123 = WeakCon 123 mkWeak _|_ = seq _|_ (WeakCon _|_) = _|_ unsafeMkWeak _|_ = WeakCon _|_ = _|_ To quote John Meacham: | A quick note, | x `seq` x | is always exactly equivalant to x. the reason being that your seq | would never be called to force x unless x was needed anyway. | | I only mention it because for some reason this realization did not hit | me for a long time and once it did a zen-like understanding of seq | (relative to the random placement and guessing method I had used | previously) suddenly was bestowed upon me. I remember this anecdote because when I first read it, a zen-like understanding of seq suddenly was bestowed upon /me/. Maybe it should be in the docs. :-) -- Ben ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe