From: sof Date: Sat, 2 Aug 1997 21:28:33 +0000 (+0000) Subject: [project @ 1997-08-02 21:28:33 by sof] X-Git-Tag: Approximately_1000_patches_recorded~163 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=753c04640d167031453e3fb4826e6107c5dc4682;p=ghc-hetmet.git [project @ 1997-08-02 21:28:33 by sof] Added reader handling of let expressions in pattern guards --- diff --git a/ghc/compiler/reader/ReadPrefix.lhs b/ghc/compiler/reader/ReadPrefix.lhs index d16dc74..aeab16a 100644 --- a/ghc/compiler/reader/ReadPrefix.lhs +++ b/ghc/compiler/reader/ReadPrefix.lhs @@ -374,6 +374,15 @@ wlkQuals cquals binds = cvBinds sf cvValSig bs in returnUgn (LetStmt binds) + U_let letvdefs letvexpr -> + wlkBinding letvdefs `thenUgn` \ binding -> + wlkExpr letvexpr `thenUgn` \ expr -> + getSrcLocUgn `thenUgn` \ loc -> + getSrcFileUgn `thenUgn` \ sf -> + let + binds = cvBinds sf cvValSig binding + in + returnUgn (GuardStmt (HsLet binds expr) loc) \end{code} Patterns: just bear in mind that lists of patterns are represented as