[Haskell-cafe] Re: unsafeInterleaveIO respecting order of actions

2009-01-01 Thread Achim Schneider
"David Menendez" wrote: > On Thu, Jan 1, 2009 at 8:29 PM, Brandon S. Allbery KF8NH > wrote: > > On 2009 Jan 1, at 20:08, David Menendez wrote: > >> > >> On Thu, Jan 1, 2009 at 7:39 PM, Achim Schneider > >> wrote: > >>> > >>> There are no lazy monads. Monads imply explicit sequencing... > >> > >

Re: [Haskell-cafe] Re: unsafeInterleaveIO respecting order of actions

2009-01-01 Thread David Menendez
On Thu, Jan 1, 2009 at 8:29 PM, Brandon S. Allbery KF8NH wrote: > On 2009 Jan 1, at 20:08, David Menendez wrote: >> >> On Thu, Jan 1, 2009 at 7:39 PM, Achim Schneider wrote: >>> >>> There are no lazy monads. Monads imply explicit sequencing... >> >> Huh? How are you defining "lazy monad"? > > > W

[Haskell-cafe] Re: unsafeInterleaveIO respecting order of actions

2009-01-01 Thread Achim Schneider
"Brandon S. Allbery KF8NH" wrote: > On 2009 Jan 1, at 20:08, David Menendez wrote: > > On Thu, Jan 1, 2009 at 7:39 PM, Achim Schneider > > wrote: > >> There are no lazy monads. Monads imply explicit sequencing... > > > > Huh? How are you defining "lazy monad"? > > > We've had this discussion

[Haskell-cafe] Re: unsafeInterleaveIO respecting order of actions

2009-01-01 Thread Achim Schneider
Achim Schneider wrote: > [...] actually, even better: main = do acts <- unsafeInterleaveIO getActs putStrLn "dumdidum" sequence_ acts , which, at least on my machine, prints dumdidum before asking for foo. -- (c) this sig last receiving data processing entity. Inspect headers for

Re: [Haskell-cafe] Re: unsafeInterleaveIO respecting order of actions

2009-01-01 Thread Brandon S. Allbery KF8NH
On 2009 Jan 1, at 20:08, David Menendez wrote: On Thu, Jan 1, 2009 at 7:39 PM, Achim Schneider wrote: There are no lazy monads. Monads imply explicit sequencing... Huh? How are you defining "lazy monad"? We've had this discussion before; somewhere in the archives is an example of a Stat

[Haskell-cafe] Re: unsafeInterleaveIO respecting order of actions

2009-01-01 Thread Achim Schneider
Henning Thielemann wrote: > > On Fri, 2 Jan 2009, Achim Schneider wrote: > > > Henning Thielemann wrote: > > > >> If it is generally possible to use unsafeInterleaveIO such that it > >> executes actions in the right order, wouldn't this allow the > >> definition of a general lazy IO monad? > >

Re: [Haskell-cafe] Re: unsafeInterleaveIO respecting order of actions

2009-01-01 Thread roconnor
On Fri, 2 Jan 2009, Achim Schneider wrote: There are no lazy monads. Monads imply explicit sequencing... writing I think this is an extremely bad thing to say and is a source of misunderstanding about monads and evaluation. Most monads _are_ lazy, and it is important to understand that when

Re: [Haskell-cafe] Re: unsafeInterleaveIO respecting order of actions

2009-01-01 Thread David Menendez
On Thu, Jan 1, 2009 at 7:39 PM, Achim Schneider wrote: > > There are no lazy monads. Monads imply explicit sequencing... Huh? How are you defining "lazy monad"? -- Dave Menendez ___ Haskell-Cafe mailing list Haskell-

Re: [Haskell-cafe] Re: unsafeInterleaveIO respecting order of actions

2009-01-01 Thread Henning Thielemann
On Fri, 2 Jan 2009, Achim Schneider wrote: Henning Thielemann wrote: If it is generally possible to use unsafeInterleaveIO such that it executes actions in the right order, wouldn't this allow the definition of a general lazy IO monad? The question is what "right order" means. Let B1..Bn

[Haskell-cafe] Re: unsafeInterleaveIO respecting order of actions

2009-01-01 Thread Achim Schneider
Henning Thielemann wrote: > If it is generally possible to use unsafeInterleaveIO such that it > executes actions in the right order, wouldn't this allow the > definition of a general lazy IO monad? > The question is what "right order" means. Let B1..Bn be some arbitrary IO-Actions. Let A1..An b