[Haskell-cafe] Is id strict?

2006-07-30 Thread David House
Hi all. I've seen two definitions of a 'strict function', which I'm trying to unite in my mind: 1) f is strict iff f _|_ = _|_. 2) f is strict iff it forces evaluation of its arguments. There is a large sticking point that in my minds seems to fit (1) but not (2): id. Clearly, id undefined is

Re: [Haskell-cafe] Serializing Functions and Actions for Distributed Programming

2006-07-30 Thread Einar Karttunen
On 29.07 14:07, Brian Sniffen wrote: I'm very excited by the ability to pass functions or IO actions between threads of the same program. But I don't see any language or library support for doing so between programs, or between sessions with the same program. OCaml provides a partial

[Haskell-cafe] Re: Is id strict?

2006-07-30 Thread Jón Fairbairn
David House [EMAIL PROTECTED] writes: Hi all. I've seen two definitions of a 'strict function', which I'm trying to unite in my mind: 1) f is strict iff f _|_ = _|_. 2) f is strict iff it forces evaluation of its arguments. There is a large sticking point that in my minds seems to fit

Re: [Haskell-cafe] Is id strict?

2006-07-30 Thread Ian Lynagh
On Sun, Jul 30, 2006 at 09:44:25AM +0100, David House wrote: I've seen two definitions of a 'strict function', which I'm trying to unite in my mind: 1) f is strict iff f _|_ = _|_. 2) f is strict iff it forces evaluation of its arguments. There is a large sticking point that in my minds

[Haskell-cafe] The difficulty of designing a sequence class

2006-07-30 Thread Brian Hulley
Hi - Part 1 of 2 - Monoid versus MonadPlus === I've just run into a troublesome question when trying to design a sequence class: class ISeq c a | c - a where empty :: c single :: a - c append :: c - c - c However I've noticed that people

Re: [Haskell-cafe] Is id strict?

2006-07-30 Thread David House
On 30/07/06, Ian Lynagh [EMAIL PROTECTED] wrote: If the value of (id x) is demanded then the value of x will always be demanded. Therefore id is strict in its first argument. ... In place of your 2), I would say (f x0 .. xn) is strict in xi if demanding the value of (f x0 .. xn) requires

Re: [Haskell-cafe] Baffled by Disk IO

2006-07-30 Thread Florian Weimer
* SevenThunders: OK it was stupid. Apparently GHC behaves differently according to what the name of the high level source file is. If I renamed test.hc to main.hc everything works the same as GHCi. I probably should actually read the manual some day. Some operating systems have a test

Re: [Haskell-cafe] Re: Is id strict?

2006-07-30 Thread Duncan Coutts
On Sun, 2006-07-30 at 10:56 +0100, Jón Fairbairn wrote: David House [EMAIL PROTECTED] writes: Hi all. I've seen two definitions of a 'strict function', which I'm trying to unite in my mind: 1) f is strict iff f _|_ = _|_. 2) f is strict iff it forces evaluation of its arguments.

[Haskell-cafe] Re: Is id strict?

2006-07-30 Thread Jón Fairbairn
Duncan Coutts [EMAIL PROTECTED] writes: On Sun, 2006-07-30 at 10:56 +0100, Jón Fairbairn wrote: David House [EMAIL PROTECTED] writes: 1) f is strict iff f _|_ = _|_. 2) f is strict iff it forces evaluation of its arguments. In (2), you have to be evaluating f on an argument before f

Re: [Haskell-cafe] Cabal in ghc 6.4.2

2006-07-30 Thread Duncan Coutts
On Sun, 2006-07-30 at 15:01 +0100, allan wrote: however with version 6.4.2 I get the following error: haskellprint$ ./Setup.hs build Preprocessing executables for haskellprint-0.1... Building haskellprint-0.1... Chasing modules from: Main.hs Could not find module

Re: [Haskell-cafe] Re: Is id strict?

2006-07-30 Thread Duncan Coutts
On Sun, 2006-07-30 at 13:22 +0100, Jón Fairbairn wrote: Duncan Coutts [EMAIL PROTECTED] writes: On Sun, 2006-07-30 at 10:56 +0100, Jón Fairbairn wrote: David House [EMAIL PROTECTED] writes: 1) f is strict iff f _|_ = _|_. 2) f is strict iff it forces evaluation of its arguments.

Re: [Haskell-cafe] Cabal in ghc 6.4.2

2006-07-30 Thread allan
The Text.ParserCombinators.Parsec modules are in the parsec module. build-depends: base Add parsec here: build-depends: base, parsec The reason it works when you run it without -hide-all-packages is that by default for convenience all packages are 'exposed'. That is they can be

Re: [Haskell-cafe] Cabal in ghc 6.4.2

2006-07-30 Thread Neil Mitchell
Hi so basically I was expecting 'Char' to be in the 'base' package, I guess this is wrong? Yes, Char is in the haskell98 package, the new name for Char is Data.Char which exports a bit more. Either add haskell98 as a package, or replace Char with Data.Char (which is in base), I'd recommend

Re: [Haskell-cafe] Cabal in ghc 6.4.2

2006-07-30 Thread allan
Yes, Char is in the haskell98 package, the new name for Char is Data.Char which exports a bit more. Either add haskell98 as a package, or replace Char with Data.Char (which is in base), I'd recommend the latter, but either should work. Thanks Neil a ha, that works, thank you both very much,

Re: [Haskell-cafe] The difficulty of designing a sequence class

2006-07-30 Thread Robert Dockins
On Sunday 30 July 2006 07:47, Brian Hulley wrote: Hi - Part 1 of 2 - Monoid versus MonadPlus === I've just run into a troublesome question when trying to design a sequence class: class ISeq c a | c - a where empty :: c single :: a - c

Re: [Haskell-cafe] Serializing Functions and Actions for Distributed Programming

2006-07-30 Thread Jason Dagit
On 7/30/06, Einar Karttunen ekarttun@cs.helsinki.fi wrote: On 29.07 14:07, Brian Sniffen wrote: I'm very excited by the ability to pass functions or IO actions between threads of the same program. But I don't see any language or library support for doing so between programs, or between

Re: [Haskell-cafe] Baffled by Disk IO

2006-07-30 Thread SevenThunders
Yes I do have another test on my path. It is in a utilities directory of unix like commands that have been ported to windows. However I also have a test.exe that was created by ghc that seems to do nothing, even if I type ./test.exe. Thanks for the hint though. -- View this message in

Re: [Haskell-cafe] Baffled by Disk IO

2006-07-30 Thread SevenThunders
Florian Weimer wrote: * SevenThunders: OK it was stupid. Apparently GHC behaves differently according to what the name of the high level source file is. If I renamed test.hc to main.hc everything works the same as GHCi. I probably should actually read the manual some day. Some

Re: [Haskell-cafe] Serializing Functions and Actions for Distributed Programming

2006-07-30 Thread Einar Karttunen
On 30.07 12:12, Jason Dagit wrote: Depending on the type of sandboxing that you need/want #2 might be possible with GHC. Take lambdabot for example. lambdabot has made it safe to allow arbitrary expression evaluation by disallowing IO and not importing unsafePerformIO and similar unsafe

Re: [Haskell-cafe] The difficulty of designing a sequence class

2006-07-30 Thread Brian Hulley
Robert Dockins wrote: On Sunday 30 July 2006 07:47, Brian Hulley wrote: Another option, is the Edison library which uses: class (Functor s, MonadPlus s) = Sequence s where so here MonadPlus is used instead of Monoid to provide empty and append. So I've got three main questions: 1) Did

[Haskell-cafe] The possibility of a real OS based on Haskell zippers

2006-07-30 Thread Andy Elvey
Hi everyone - I'm very much a Haskell newbie, but have followed Haskell (and the various Haskell sites) for quite a few months now, and I absolutely *love* the language. One thing that **fascinated** me a while ago was the site which gave Haskell code for a Haskell-based fileserver/OS using