Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-27 Thread John Meacham
On Wed, Aug 27, 2008 at 12:17:46PM -0500, Derek Elkins wrote: On Wed, 2008-08-27 at 02:35 -0700, John Meacham wrote: However, note the weasel words. Those are in there on purpose, every design calls for different solutions. To blanketly say certain constructs are just wrong to the point of

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-27 Thread Lennart Augustsson
I didn't say NetBSD doesn't use global variables, I said the device driver model doesn't use global variables. And quite a few things that used to be in global variables have been moved into allocated variables and are being passed around instead. That's simply a better way to structure the code.

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-27 Thread Brandon S. Allbery KF8NH
On 2008 Aug 27, at 12:12, Jonathan Cast wrote: * I wonder why that name was chosen? The design doesn't seem to have anything to do with IO, it's more of a `we have this in C so we want it in Haskell too' monad. As I understand it, IO means anything not encompassed by

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-27 Thread John Meacham
On Thu, Aug 28, 2008 at 12:15:10AM +0100, Lennart Augustsson wrote: I didn't say NetBSD doesn't use global variables, I said the device driver model doesn't use global variables. And quite a few things that used to be in global variables have been moved into allocated variables and are being

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-26 Thread Adrian Hey
John Meacham wrote: I forgot who came up with the original ACIO idea, but I'd give them props in the manual if they wish. I think this is based on Ian Starks message.. http://www.haskell.org/pipermail/haskell-cafe/2004-November/007664.html Yeah, this sounds like a great idea. there were a

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-26 Thread Judah Jacobson
On Tue, Aug 26, 2008 at 12:07 AM, Adrian Hey [EMAIL PROTECTED] wrote: But from a top level aThing - someACIO point of view, if we're going to say that it doesn't matter if someACIO is executed before main is entered (possibly even at compile time) or on demand, then we clearly don't want to

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-26 Thread Lennart Augustsson
Making a network stack from peek and poke is easy in a well structured OS. The boot loader (or whatever) hands you the capability (call it something else if you want) to do raw hardware access, and you build from there. If you look at well structured OSs like NetBSD, this is pretty much how they

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-26 Thread Derek Elkins
On Tue, 2008-08-26 at 18:34 +0100, Adrian Hey wrote: I have a feeling this is going to be a very long thread so I'm trying to go to Haskell cafe again (without mucking it up again). Derek Elkins wrote: Haskell should be moving -toward- a capability-like model, not away from it. Could

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-26 Thread Adrian Hey
Lennart Augustsson wrote: Making a network stack from peek and poke is easy in a well structured OS. The boot loader (or whatever) hands you the capability (call it something else if you want) to do raw hardware access, and you build from there. If you look at well structured OSs like NetBSD,

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-26 Thread John Meacham
On Tue, Aug 26, 2008 at 01:14:34AM -0700, Judah Jacobson wrote: On Tue, Aug 26, 2008 at 12:07 AM, Adrian Hey [EMAIL PROTECTED] wrote: But from a top level aThing - someACIO point of view, if we're going to say that it doesn't matter if someACIO is executed before main is entered

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-26 Thread John Meacham
On Tue, Aug 26, 2008 at 08:07:24AM +0100, Adrian Hey wrote: But from a top level aThing - someACIO point of view, if we're going to say that it doesn't matter if someACIO is executed before main is entered (possibly even at compile time) or on demand, then we clearly don't want to observe any

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-26 Thread Lennart Augustsson
I told you where to look at code. It's C code, mind you, but written in a decent way. No well written device driver ever accesses memory or IO ports directly, doing so would seriously hamper portability. Instead you use an abstraction layer to access to hardware, and the driver gets passed a bus

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-26 Thread Lennart Augustsson
BTW, I'm not contradicting that the use of global variables can be necessary when interfacing with legacy code, I just don't think it's the right design when doing something new. -- Lennart On Tue, Aug 26, 2008 at 9:47 PM, Adrian Hey [EMAIL PROTECTED] wrote: Lennart Augustsson wrote: Making

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-25 Thread John Meacham
On Mon, Aug 25, 2008 at 04:55:05PM +0100, Adrian Hey wrote: (Moving to Haskell cafe) Edward Kmett wrote: On Sun, Aug 24, 2008 at 7:12 PM, Ashley Yakeley [EMAIL PROTECTED] wrote: Is there any interest in implementing a top level - to run monadic code? This is actually implemented in jhc.

Re: [Haskell-cafe] Re: [Haskell] Top Level TWI's again

2004-11-24 Thread Marcin 'Qrczak' Kowalczyk
Benjamin Franksen [EMAIL PROTECTED] writes: stdin = makeHandle 0 stdout = makeHandle 1 stderr = makeHandle 2 in absolutely pure Haskell, only the things that manipulate them need be in the IO monad. If they were simple wrappers around the integers, you'd be right and I couldn't

<    1   2