From: simonpj@microsoft.com Date: Wed, 22 Sep 2010 13:38:01 +0000 (+0000) Subject: Get rid of non-exhaustive lambda X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e9b68a09e815946e9d6b6606f80e43d582cf098d;p=ghc-hetmet.git Get rid of non-exhaustive lambda --- diff --git a/compiler/coreSyn/CoreLint.lhs b/compiler/coreSyn/CoreLint.lhs index 3205ca8..234dcbb 100644 --- a/compiler/coreSyn/CoreLint.lhs +++ b/compiler/coreSyn/CoreLint.lhs @@ -272,8 +272,9 @@ lintCoreExpr e@(App fun arg) lintCoreExpr (Lam var expr) = addLoc (LambdaBodyOf var) $ - lintBinders [var] $ \[var'] -> - do { body_ty <- lintCoreExpr expr + lintBinders [var] $ \ vars' -> + do { let [var'] = vars' + ; body_ty <- lintCoreExpr expr ; if isId var' then return (mkFunTy (idType var') body_ty) else