parsing differences

1997-07-31 Thread Justin Cormack
Hugs will happily accept definitions such as: (f `cross` g) (x, y) = (f x , g y) while ghc gives parse error on input: "cross" It is not that ghc doesn't like any definition with `` on the left, as x `op` y = x + y is fine, it just seems to be cases with brackets. It is not entirely clear from

Re: parsing differences

1997-07-31 Thread Alastair Reid
Hugs incorrectly allows declarations such as: (f `cross` g) (x, y) = (f x , g y) and (f.g) x = f (g x) because it parses patterns as expressions and then weeds out the things that don't make any sense. GHC does a better job of implementing Haskell 1.4 syntax/semantics in this regard.