[project @ 2002-02-04 11:49:33 by simonmar]
authorsimonmar <unknown>
Mon, 4 Feb 2002 11:49:33 +0000 (11:49 +0000)
committersimonmar <unknown>
Mon, 4 Feb 2002 11:49:33 +0000 (11:49 +0000)
Tighten up syntax w.r.t. Haskell 98; this is disallowed:

(a `op` b) = ...

since a parenthesised lhs must be followed by at least one parameter.

ghc/compiler/parser/ParseUtil.lhs

index 7d2d2b9..8d57937 100644 (file)
@@ -290,7 +290,7 @@ isFunLhs (OpApp l (HsVar op) fix r) es  | not (isRdrDataCon op)
 isFunLhs (HsVar f) es | not (isRdrDataCon f)
                                = Just (f,False,es)
 isFunLhs (HsApp f e) es        = isFunLhs f (e:es)
-isFunLhs (HsPar e)   es        = isFunLhs e es
+isFunLhs (HsPar e)   es@(_:_)  = isFunLhs e es
 isFunLhs _ _                   = Nothing
 
 ---------------------------------------------------------------------------