> The following ``code'' forces ghc-4.04 to crash with an
> internal Happy error message:
> 
> > module Rules where
> 
> > import GlaExts
> > import PrelGHC
> 
> > integerGcd :: Integer -> Integer -> Integer
> > integerGcd a b
> >   = case a of
> >       (S# a) -> case b of
> >                   (S# b) -> unsafePerformIO $
> >                             _ccall_ gcdSSSZh (I# a) 
> (1::Int) (I# b) >>= \g ->
> >                             case g of (I# g) -> return (S# g)
> >                   (J# sb b) -> unsafePerformIO $
> >                                _casm_ gcdSBSZh a sb b >>= \g ->
> >                                case g of (I# g) -> return (S# g)

I get a parse error:

        ~/scratch > ghc-4.04 test57.lhs -fglasgow-exts  
        test57.lhs:14: parse error on input `gcdSBSZh'

it maybe that you compiled up your GHC with an old version of Happy - there
have been several bugfixes in this area in the last few months.

Cheers,
        Simon

Reply via email to