From: simonpj Date: Fri, 11 Jun 1999 11:26:20 +0000 (+0000) Subject: [project @ 1999-06-11 11:26:20 by simonpj] X-Git-Tag: Approximately_9120_patches~6135 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=ad240f4e1b92c9f460dc9dbe33e0f9f82e597794;p=ghc-hetmet.git [project @ 1999-06-11 11:26:20 by simonpj] Missing case in collectTypedPatBinders; Andreas Marth bug report --- diff --git a/ghc/compiler/deSugar/DsHsSyn.lhs b/ghc/compiler/deSugar/DsHsSyn.lhs index 78bb125..3f14f9d 100644 --- a/ghc/compiler/deSugar/DsHsSyn.lhs +++ b/ghc/compiler/deSugar/DsHsSyn.lhs @@ -63,14 +63,15 @@ collectTypedMonoBinders (AbsBinds _ _ exports _ _) = [global | (_, global, local) <- exports] collectTypedPatBinders :: TypecheckedPat -> [Id] -collectTypedPatBinders (VarPat var) = [var] -collectTypedPatBinders (LazyPat pat) = collectTypedPatBinders pat -collectTypedPatBinders (AsPat a pat) = a : collectTypedPatBinders pat -collectTypedPatBinders (ConPat _ _ _ _ pats) = concat (map collectTypedPatBinders pats) -collectTypedPatBinders (ListPat t pats) = concat (map collectTypedPatBinders pats) -collectTypedPatBinders (TuplePat pats _) = concat (map collectTypedPatBinders pats) +collectTypedPatBinders (VarPat var) = [var] +collectTypedPatBinders (LazyPat pat) = collectTypedPatBinders pat +collectTypedPatBinders (AsPat a pat) = a : collectTypedPatBinders pat +collectTypedPatBinders (ConPat _ _ _ _ pats) = concat (map collectTypedPatBinders pats) +collectTypedPatBinders (ListPat t pats) = concat (map collectTypedPatBinders pats) +collectTypedPatBinders (TuplePat pats _) = concat (map collectTypedPatBinders pats) collectTypedPatBinders (RecPat _ _ _ _ fields) = concat (map (\ (f,pat,_) -> collectTypedPatBinders pat) - fields) -collectTypedPatBinders (DictPat ds ms) = ds ++ ms -collectTypedPatBinders any_other_pat = [ {-no binders-} ] + fields) +collectTypedPatBinders (DictPat ds ms) = ds ++ ms +collectTypedPatBinders (NPlusKPat var _ _ _ _) = [var] +collectTypedPatBinders any_other_pat = [ {-no binders-} ] \end{code}