[Haskell-cafe] submenu doesn't seem to work properly in wxhaskell

2006-10-03 Thread Maarten
Dear all, The following code doesn't seem to work properly. Either the main entry (m1/mp1) or it's sub menu entry (ms1/mps1) do not seem to propagate the event when pressed. It is possible to make it working by uncomments the lines where the menu commands are registered in the frame. I have

[Haskell-cafe] Re: irrefutable patterns for existential types / GADTs

2006-10-03 Thread apfelmus
John Meacham wrote: the reason being that id translates internally to id = /\a . \x::a . x since you cannot pull out an appropriate type to pass to id without evaluating the 'irrefutable' pattern, you end up with _|_ instead of 4. basically, allowing irrefutable matching on

[Haskell-cafe] Haskell compiler from a USB Stick?

2006-10-03 Thread David House
Hi all. Does anyone know of a Haskell compiler that will run from a USB stick? I think something like Hugs + minimal libraries + WinHugs should be small enough to install onto the stick, but I haven't tested this. That'd be the ideal scenario as I'm teaching Haskell (so won't need complicated

Re: [Haskell-cafe] Haskell compiler from a USB Stick?

2006-10-03 Thread Neil Mitchell
Hi, I think something like Hugs + minimal libraries + WinHugs should be small enough to install onto the stick, but I haven't tested this. See MinHugs, http://cvs.haskell.org/Hugs/pages/downloading.htm, it should fit on a USB stick easily, just install it to the USB drive and you should be

[Haskell-cafe] collection monads

2006-10-03 Thread Matthias Fischmann
another beginners question about monads: given the type | data (Ix x) = Permutation x = Permutation [x] i wanted to define | instance Monad Permutation where | return xs = Permutation xs but of course nothing about the monad class guarantees xs to be of type list. the monad class seems

Re: [Haskell-cafe] Haskell compiler from a USB Stick?

2006-10-03 Thread Bulat Ziganshin
Hello David, Tuesday, October 3, 2006, 2:17:33 PM, you wrote: Does anyone know of a Haskell compiler that will run from a USB stick? i'm ôäüùûå sure that both hugs and ghc will work. all that you need is to use full pathname of executable in cmdline, it should find other settings itself. or,

Re: [Haskell-cafe] Either as a Monad instance

2006-10-03 Thread Lennart Augustsson
On Oct 3, 2006, at 03:49 , Ross Paterson wrote: On Tue, Oct 03, 2006 at 10:44:49AM +1000, Thomas Conway wrote: I've been [trying to] grapple with the various monads and transformers, and it occurs to me that the standard instance for Either as a monadic type is unnecessarily restrictive. Is

Re: [Haskell-cafe] Either as a Monad instance

2006-10-03 Thread Ross Paterson
On Tue, Oct 03, 2006 at 07:52:54AM -0400, Lennart Augustsson wrote: Yes, having fail in the Monad is a horrible wart. And like some other warts in Haskell it was added to cure the symptom rather than the disease. :( Switching metaphors, what do you see as the disease in this case? (As far as

[Haskell-cafe] Re: Haskell compiler from a USB Stick?

2006-10-03 Thread Jón Fairbairn
Bulat Ziganshin [EMAIL PROTECTED] writes: Hello David, Tuesday, October 3, 2006, 2:17:33 PM, you wrote: Does anyone know of a Haskell compiler that will run from a USB stick? i'm ôäüùûå sure Блым? -- Jón Fairbairn [EMAIL PROTECTED]

Re: [Haskell-cafe] Either as a Monad instance

2006-10-03 Thread Brian Hulley
Ross Paterson wrote: On Tue, Oct 03, 2006 at 07:52:54AM -0400, Lennart Augustsson wrote: Yes, having fail in the Monad is a horrible wart. (As far as I know, it's there for the translation of pattern match failure in do-expressions.) I think it would be much less of a wart if the signature

[Haskell-cafe] Re: Haskell compiler from a USB Stick?

2006-10-03 Thread Max Vasin
Jón == Jón Fairbairn [EMAIL PROTECTED] writes: Jón Bulat Ziganshin [EMAIL PROTECTED] writes: Hello David, Tuesday, October 3, 2006, 2:17:33 PM, you wrote: Does anyone know of a Haskell compiler that will run from a USB stick? i'm ôäüùûå sure Jón Блым? almost %-) Bulat accidently

[Haskell-cafe] Mis-understanding something in Haskell interpretation

2006-10-03 Thread Edward Ing
Hi, I am new to Haskell and am learning Haskell on my own with The Haskell School of Expression. Unfortunately there is no teacher that comes along with the book. I am having a problem with loading an excerise. I get this message from ghci on a :l Shapes.hs Shapes.hs:40:40: Couldn't match

Re: [Haskell-cafe] Mis-understanding something in Haskell interpretation

2006-10-03 Thread J. Garrett Morris
On 10/3/06, Edward Ing [EMAIL PROTECTED] wrote: The source is below. Side is types as Float. My assumption was that Haskell would know how to convert the Int to a float and all would be well. I am I mistaken somewhere? The problem is with the last line. Yes - Haskell does not automatically

Re: [Haskell-cafe] Mis-understanding something in Haskell interpretation

2006-10-03 Thread Bulat Ziganshin
Hello Edward, Tuesday, October 3, 2006, 9:44:27 PM, you wrote: Couldn't match `Side' against `Int' In the first argument of `sin', namely `angle' The source is below. Side is types as Float. My assumption was that Haskell would know how to convert the Int to a float and all would be

Re: [Haskell-cafe] Either as a Monad instance

2006-10-03 Thread Lennart Augustsson
It all came about because pattern matching failure sometimes cause a do expression to be in MonadZero rather than Monad with the old translation. This gave rise to confusing error messages, it was claimed. This was the disease. -- Lennart On Oct 3, 2006, at 08:28 , Ross Paterson

Re: [Haskell-cafe] Re: irrefutable patterns for existential types / GADTs

2006-10-03 Thread John Meacham
On Tue, Oct 03, 2006 at 12:10:52PM +0200, [EMAIL PROTECTED] wrote: So you mean that id = /\a . \x :: a . x is /strict/ in its first argument, i.e. in the /type/ a. So to speak, type erasure is equivalent to strictness in all and every type argument. For an irrefutable existential

[Haskell-cafe] Error building Edison 1.2.0.1

2006-10-03 Thread Lyle Kopnicky
Hi folks, I tried to build edison-1.2.0.1-sources with the command 'make system' but got: *** Exception: Line 10: Unknown field 'hs-source-dirs' I am using GHC 6.4.1. Any idea how to fix this? Thanks, Lyle ___ Haskell-Cafe mailing list

[Haskell-cafe] layout monads

2006-10-03 Thread Thomas Conway
Hi All, Next monad query [*] In the 1995 paper Composing Haggis, layout is done using a monad to compose individual elements. To modernize the syntax consider (forgive the operator, but it avoids parentheses): infixl 1 | f | x = f x mylayout = do hbox | do button ok

Re: [Haskell-cafe] Error building Edison 1.2.0.1

2006-10-03 Thread Robert Dockins
On Tuesday 03 October 2006 22:00, Lyle Kopnicky wrote: Hi folks, I tried to build edison-1.2.0.1-sources with the command 'make system' but got: *** Exception: Line 10: Unknown field 'hs-source-dirs' I am using GHC 6.4.1. Any idea how to fix this? You are probably using an older version

Re: [Haskell-cafe] Error building Edison 1.2.0.1

2006-10-03 Thread Lyle Kopnicky
Robert Dockins wrote: On Tuesday 03 October 2006 22:00, Lyle Kopnicky wrote: Hi folks, I tried to build edison-1.2.0.1-sources with the command 'make system' but got: *** Exception: Line 10: Unknown field 'hs-source-dirs' I am using GHC 6.4.1. Any idea how to fix this?