[project @ 2002-09-16 14:09:35 by simonmar]
authorsimonmar <unknown>
Mon, 16 Sep 2002 14:09:35 +0000 (14:09 +0000)
committersimonmar <unknown>
Mon, 16 Sep 2002 14:09:35 +0000 (14:09 +0000)
Type signatures may only be given for unqualified variables

ghc/compiler/parser/ParseUtil.lhs

index 4e6c911..c77a990 100644 (file)
@@ -286,7 +286,7 @@ checkValSig
        -> RdrNameHsType
        -> SrcLoc
        -> P RdrBinding
-checkValSig (HsVar v) ty loc = returnP (RdrSig (Sig v ty loc))
+checkValSig (HsVar v) ty loc | isUnqual v = returnP (RdrSig (Sig v ty loc))
 checkValSig other     ty loc = parseError "Type signature given for an expression"