Re: [Haskell] Parsec question: attempted 'notMatching' combinator

2004-02-17 Thread Andrew Pimlott
On Tue, Feb 17, 2004 at 04:57:34PM -0500, Andrew Pimlott wrote: > What about a more prosaic implementation: > > notFollowedBy' :: Show a => GenParser tok st a -> GenParser tok st () > notFollowedBy' p= do res <- do a <- try p; return $ Just a > <

Re: [Haskell] updating graphs non-destructively

2004-02-17 Thread S. Alexander Jacobson
Thank you for the link to FGL. I also looked at the boilerplate stuff. If *feels* like there should be a way to embed the graph stuff in the boilerplate stuff to allow non-destructive update of arbitrary object graphs without handcoding the mapping of the datastructure to an object graph? Is thi

[Haskell] Impredicative Types?

2004-02-17 Thread Ashley Yakeley
In article <[EMAIL PROTECTED]>, Ben Rudiak-Gould <[EMAIL PROTECTED]> wrote: > > Bear in mind you can't even write IO (forall t. whatever) in Haskell. > > True, but why is this? Is there a deep reason why we can use nested > foralls as the arguments to (->), but not as the arguments to any other

Re: [Haskell] Parsec question: attempted 'notMatching' combinator

2004-02-17 Thread Andrew Pimlott
On Tue, Feb 17, 2004 at 07:48:52PM +, Graham Klyne wrote: > Thanks! That got me going, though not with quite what you suggested. > > I ended up with this: > [[ > notMatching :: Show a => GenParser tok st a -> GenParser tok st () > notMatching p = do { a <- try p ; unexpected (show a) } <|> re

[Haskell] Program code storage space exhausted

2004-02-17 Thread Christian Maeder
Hi, does hugs Nov 2003 allow to increase the space for the program being loaded? (This is not the heap size!) Cheers Christian ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell] Parsec question: attempted 'notMatching' combinator

2004-02-17 Thread Graham Klyne
Thanks! That got me going, though not with quite what you suggested. I ended up with this: [[ notMatching :: Show a => GenParser tok st a -> GenParser tok st () notMatching p = do { a <- try p ; unexpected (show a) } <|> return () ]] which does the required job for me. Using your version caused t

Re: [Haskell] Parsec question: attempted 'notMatching' combinator

2004-02-17 Thread Andrew Pimlott
On Tue, Feb 17, 2004 at 06:42:39PM +, Graham Klyne wrote: > I've attempted to define a Parsec combinator thus: > > [[ > notMatching :: Show a => GenParser tok st a -> GenParser tok st () > notMatching p = try ( do { a <- p ; unexpected (show a) } <|> return () ) > ]] If p fails but consumes s

[Haskell] Parsec question: attempted 'notMatching' combinator

2004-02-17 Thread Graham Klyne
I've attempted to define a Parsec combinator thus: [[ notMatching :: Show a => GenParser tok st a -> GenParser tok st () notMatching p = try ( do { a <- p ; unexpected (show a) } <|> return () ) ]] It's modelled on the Parsec-provided combinator 'notFollowedBy', but is less fussy about the type o

RE: [Haskell] non-ASCII characters in Haddock documentation

2004-02-17 Thread Graham Klyne
At 10:35 17/02/04 +, Simon Marlow wrote: We didn't choose Latin-1 over UTF-8: the current situation just reflects the fact that we haven't implemented UTF-8 yet. It's not trivial to expand GHC's current Alex specification to handle the whole Unicode character set. See this message for some mu

Re: [Haskell] Haddock, QuickCheck, and Functional Design by Contract

2004-02-17 Thread John Hughes
Robert Will wrote: 4. A notation for preconditions. For simple functions a Precondition can be calculated automatically from the Patterns: head (x:xs) = x Gives the Precondition @xs /= []@ for @head [EMAIL PROTECTED] This only needs some simple knowledge about

RE: [Haskell] non-ASCII characters in Haddock documentation

2004-02-17 Thread Simon Marlow
> >It may seem so to western europeans, but others may differ. > >A case could be made for UTF-8. > > I tend to agree. Further, the choice of defaulting to > Latin-1 seems a > strange one when much of the rest of the world (well, the > networking world) > seems to be moving towards more uni

[Haskell] Haddock, QuickCheck, and Functional Design by Contract

2004-02-17 Thread Robert Will
> import QuickCheck Dear developers of QuickCheck and Haddock, Dear Haskell-Community, ((Summary: I'm trying to find notations for Design by Contract in Haskell which can be standardised to be used by tools like Haddock and QuickCheck. This will give Haskell programmers an order-of-magnitude