a mysterous bug with ghc type class (GHC 6.2)

2004-03-05 Thread Kenny LU Zhuo Ming
I have the following code: it inserts a label pair into list of list, which contains label pairs sharing the common label. I run it with ghci -fglasglow-exts -fallow-undecidable-instances *Test ins a Nil Cons (Cons (LAB A [],[]) Nil) Nil *Test ins a (ins a Nil) Cons (Cons (LAB A [],[]) (Cons

Parsec State Monad Question

2004-03-05 Thread John Knottenbelt
Hi I was wondering if it was possible to write a function that allows changing the state type of the Parser monad from Parsec. The full parser type is: GenParser p s a, where p is the token type, s is the state type and a is the return type of the monad. However, I mostly use CharParser s a

Misleading error message

2004-03-05 Thread Josef Svenningsson
Hi all, This mail is a little story about a little guy called Josef and a little adventure he had this week together with the compiler ghc. Although exciting, this adventure took him several hours and Josef would have been happier without it. So he appeals to the implementors to improve on the

Re: Parsec State Monad Question

2004-03-05 Thread Christian Maeder
In a local copy of Parsec.Prim I've added: mapState :: (st1 - st2) - State tok st1 - State tok st2 mapState f (State i p u) = State i p $ f u mapOkReply :: (st1 - st2) - Reply tok st1 a - Reply tok st2 a mapOkReply _ (Error a) = Error a mapOkReply f (Ok a s e) = Ok a (mapState f s) e mapConsumed

Re: Release Candidate for 6.2.1 available

2004-03-05 Thread Donald Bruce Stewart
simonmar: Also: I'm fiddling around with a new design for GHC's web pages. Please browse on over and let me know what you think, especially if it doesn't work on your browser: http://www.haskell.org/ghc/staging/ Nice. Looks good in text too.

Re: Release Candidate for 6.2.1 available

2004-03-05 Thread Sven Panne
Any chance of a *.msi for the release candidate? A nightly *.msi would be even better... Cheers, S. ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

RE: Misleading error message

2004-03-05 Thread Simon Peyton-Jones
Good story. The error message is indeed misleading. We've clarified the documentation in the HEAD, and vastly improved the error message. We'll merge the fix into 6.2 if it's not too hard to do so. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:glasgow-haskell-users- |

RE: Release Candidate for 6.2.1 available

2004-03-05 Thread Simon Marlow
Also: I'm fiddling around with a new design for GHC's web pages. Please browse on over and let me know what you think, especially if it doesn't work on your browser: http://www.haskell.org/ghc/staging/ For those who had layout problems with the new pages, please try again. It now

Overlapping instances and multi-parameter classes

2004-03-05 Thread Mike Gunter
Given the following: import Data.Maybe ( fromMaybe ) data None none = error none evaluated :: None these class and instance declarations: classToMaybe2 ba where toMaybe2 :: a - Maybe b instance ToMaybe2 a None where toMaybe2 = const Nothing instance ToMaybe2 aa

RE: [Haskell] Per-type function namespaces (was: Data.Set whishes)

2004-03-05 Thread Simon Peyton-Jones
| From: Ross Paterson [mailto:[EMAIL PROTECTED] | | On Thu, Mar 04, 2004 at 09:21:23AM -, Simon Peyton-Jones wrote: | My personal view is this: we should have adopted the ML view of records. | It solves the immediate problem, and no more elaborate scheme seems | sufficiently right to be

Re: [Haskell] Per-type function namespaces (was: Data.Set whishes)

2004-03-05 Thread Tom Pledger
Conor McBride wrote: [...] There's a catch, of course. When you write r | e you give the typechecker no clue as to the type of r: it just has to infer the type of r and hope it's a datatype. This is reminiscent of an issue I encountered a year or so ago, when designing a language. The main

[Haskell-cafe] matching constructors

2004-03-05 Thread Vadim Zaliva
Hi! I am new to Haskell, but I have background in various programming languages (including Lisp) I have very basic question, if there is a way to match algebraic types constructors besides use of pattern matching. I wrote today code like this: data Flag = Verbose | Input String |

Re: [Haskell-cafe] matching constructors

2004-03-05 Thread Brandon Michael Moore
On Fri, 5 Mar 2004, Vadim Zaliva wrote: Hi! I am new to Haskell, but I have background in various programming languages (including Lisp) I have very basic question, if there is a way to match algebraic types constructors besides use of pattern matching. I wrote today code like this:

[Haskell-cafe] Instance Problem

2004-03-05 Thread 98222
How can I do this: class M a where tok::a-String instance M String where tok s=String instance Num a=M a where tok n=Number instance (for all other types a)=M a where tok x=Other ___ Haskell-Cafe mailing list [EMAIL PROTECTED]