Make CoreLint give a more informative error message
authorsimonpj@microsoft.com <unknown>
Mon, 5 Nov 2007 16:12:17 +0000 (16:12 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 5 Nov 2007 16:12:17 +0000 (16:12 +0000)
compiler/coreSyn/CoreLint.lhs

index 07e1284..298c150 100644 (file)
@@ -366,8 +366,8 @@ lintCoreExpr e@(Case scrut var alt_ty alts) =
                    else lintAndScopeId var
      ; scope $ \_ ->
        do { -- Check the alternatives
-            checkCaseAlts e scrut_ty alts
-          ; mapM (lintCoreAlt scrut_ty alt_ty) alts
+            mapM (lintCoreAlt scrut_ty alt_ty) alts
+          ; checkCaseAlts e scrut_ty alts
           ; return alt_ty } }
   where
     pass_var f = f var