Re: GHC 2.10 complains about layout

1998-02-06 Thread Simon Marlow
[EMAIL PROTECTED] (Kevin Hammond) writes: It sounds like if we allow empty declarations, then we have to fix the layout rule. Is that the case? I think the layout rule is still fine (there are already empty declarations in some cases, e.g. class). Empty declarations in classes are

Addenda: GHC 3.00 Error when introducing an ErrorMonad

1998-02-06 Thread Einar Wolfgang Karlsen
Regarding my previous mail: The problem is caused by the definition of catchall that uses the operation catch of the IO monad rather than the more general class operation trap of ErrorMonad. The previous definition is: catchall c1 c2 = catch c1 (\_ - c2) which should be:

GHC 3.00 Error when introducing an ErrorMonad

1998-02-06 Thread Einar Wolfgang Karlsen
-- X-Sun-Data-Type: text X-Sun-Data-Description: text X-Sun-Data-Name: text X-Sun-Charset: us-ascii X-Sun-Content-Lines: 27 While experimenting with multiple parameter type classes, I introduced an ErrorMonad. Compiling this with GHC 3.00, the following happened: Computation.hs:16:

Re: bug report 3.00

1998-02-06 Thread Sigbjorn Finne
Marc van Dongen= writes: While compiling some happy output with 3.00 I came across the following: NOTE: Simplifier still going after 4 iterations; bailing out. NOTE: Simplifier still going after 4 iterations; bailing out. panic! (the `impossible' happened): fun_result_ty:

Re: GHC 3.00 Bug or New Restriction ????

1998-02-06 Thread Ralf Hinze
Simon Marlow [EMAIL PROTECTED] writes Best way around it is to use a newtype: newtype ListBlah = ListBlah [Blah] instance Show ListBlah where Ok, it's a bit of a pain to put the extra constructors everywhere, but at least you don't lose any efficiency. Is that `True'? Does the

Re: GHC 3.00 Bug or New Restriction ????

1998-02-06 Thread Simon Marlow
Ralf Hinze [EMAIL PROTECTED] writes: newtype ListBlah = ListBlah [Blah] instance Show ListBlah where Ok, it's a bit of a pain to put the extra constructors everywhere, but at least you don't lose any efficiency. Is that `True'? Does the compiler spot identity functions like

Another panic

1998-02-06 Thread Einar Wolfgang Karlsen
-- X-Sun-Data-Type: text X-Sun-Data-Description: text X-Sun-Data-Name: text X-Sun-Charset: us-ascii X-Sun-Content-Lines: 27 The following works fine with GHC 3.00: class Variable v where updVar :: v a - (a - IO (a,b)) - IO b applyVar :: Variable v = v a - (a - a) - IO a

Re: GHC 2.10 complains about layout

1998-02-06 Thread Kevin Hammond
At 11:17 am 5/2/98, Simon Marlow wrote: Ok, that sounds like a reasonable fix. I'd be happier if the semicolon was constrained to being one that had been inserted by the layout system, though. That just needs you to use different tokens for the two kinds of semicolon (plus a production for the

Re: GHC 3.00 Error when introducing an ErrorMonad

1998-02-06 Thread Simon L Peyton Jones
While experimenting with multiple parameter type classes, I introduced an ErrorMonad. Compiling this with GHC 3.00, the following happened: Computation.hs:16: Warning: `ErrorMonad' mentioned twice in export list I'll look into this. panic! (the `impossible' happened):

MPC Problem --- II

1998-02-06 Thread Stefan Westmeier
The following class causes the generated C Code to cause an error: class (OMSObjectC o,OMSObjectC o',OMSLinkC l,OMSLnkAttrC a,OMSAttrValC av) = OMSLnkAttrAppC l o o' a av where lAGet :: IO (a l o o') - IO av lAGet' :: (a l o o')- IO av lASet :: IO (a l o o') - av -

Re: bug report 3.00

1998-02-06 Thread Simon L Peyton Jones
panic! (the `impossible' happened): fun_result_ty: 6 GHC.Int#{-3e-} - GHC.Int#{-3e-} - b_trKC - PolyParse.HappyState{-rq9-} b_trKC c_trKD - [PolyParse.HappyState{-rq9-} b_trKC c_trKD] -

Strange time behaviour without optimisations

1998-02-06 Thread Olaf Chitil
I know that ghc performs hardly any optimisation if called without -O or -O2. However, is it necessary that just adding a single function definition to a program *without* calling this function increases execution time by 50%? (ghc-2.08) Example: {- fromStepTo :: Int - Int - Int - [Int]

Re: Another panic

1998-02-06 Thread Simon L Peyton Jones
The following works fine with GHC 3.00: class Variable v where updVar :: v a - (a - IO (a,b)) - IO b applyVar :: Variable v = v a - (a - a) - IO a applyVar v f = updVar' v (\x - let x' = f x in (x',x')) By changing the definition of applyVar

Re: MPC Problem --- II

1998-02-06 Thread Simon L Peyton Jones
Nice point! For the class decl class (C a, D a) = E a where {...} we use to generate superclass selectors: scsel_E_C :: E a - C a scsel_E_D :: E a - D a But now there can be class decls like yours: class (C a, C b) = E a b where {...} and our naming