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
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
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
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
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.
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
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-
|
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
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
| 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
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
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 |
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:
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]
14 matches
Mail list logo