[project @ 2000-05-23 11:35:36 by simonpj]
[ghc-hetmet.git] / ghc / compiler / hsSyn / HsBinds.lhs
index 16f135f..4e2f98b 100644 (file)
@@ -103,15 +103,19 @@ data MonoBinds id pat
   | AndMonoBinds    (MonoBinds id pat)
                    (MonoBinds id pat)
 
-  | PatMonoBind     pat
-                   (GRHSs id pat)
-                   SrcLoc
-
-  | FunMonoBind     id
+  | FunMonoBind     id         -- Used for both functions      f x = e
+                               -- and variables                f = \x -> e
+                               -- Reason: the Match stuff lets us have an optional
+                               --         result type sig      f :: a->a = ...mentions a...
                    Bool                -- True => infix declaration
                    [Match id pat]
                    SrcLoc
 
+  | PatMonoBind     pat                -- The pattern is never a simple variable;
+                               -- That case is done by FunMonoBind
+                   (GRHSs id pat)
+                   SrcLoc
+
   | VarMonoBind            id                  -- TRANSLATION
                    (HsExpr id pat)