X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FhsSyn%2FHsBinds.lhs;h=4e2f98bcbd0d7d3772828da441275b241116c5b1;hb=bb91427f27c940e4dd0fc6c7360e7ef61264b240;hp=16f135f4b2c3cb3f2b53f352f1089d192271e412;hpb=20adb5df3cd05ca245192afaeaa5d183b483c5ad;p=ghc-hetmet.git diff --git a/ghc/compiler/hsSyn/HsBinds.lhs b/ghc/compiler/hsSyn/HsBinds.lhs index 16f135f..4e2f98b 100644 --- a/ghc/compiler/hsSyn/HsBinds.lhs +++ b/ghc/compiler/hsSyn/HsBinds.lhs @@ -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)