[commit: ghc] master: Tiny refactor in Core Lint (8c1d6b7)

git at git.haskell.org git at git.haskell.org
Tue Feb 27 08:45:11 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/8c1d6b7d196f41669f052f16151423f7ce9842f8/ghc

>---------------------------------------------------------------

commit 8c1d6b7d196f41669f052f16151423f7ce9842f8
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Feb 20 10:45:21 2018 +0000

    Tiny refactor in Core Lint


>---------------------------------------------------------------

8c1d6b7d196f41669f052f16151423f7ce9842f8
 compiler/coreSyn/CoreLint.hs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/compiler/coreSyn/CoreLint.hs b/compiler/coreSyn/CoreLint.hs
index b0d2ac3..4fa3425 100644
--- a/compiler/coreSyn/CoreLint.hs
+++ b/compiler/coreSyn/CoreLint.hs
@@ -1457,7 +1457,7 @@ lintCoreRule _ _ (BuiltinRule {})
 lintCoreRule fun fun_ty rule@(Rule { ru_name = name, ru_bndrs = bndrs
                                    , ru_args = args, ru_rhs = rhs })
   = lintBinders LambdaBind bndrs $ \ _ ->
-    do { lhs_ty <- foldM lintCoreArg fun_ty args
+    do { lhs_ty <- lintCoreArgs fun_ty args
        ; rhs_ty <- case isJoinId_maybe fun of
                      Just join_arity
                        -> do { checkL (args `lengthIs` join_arity) $
@@ -1467,7 +1467,8 @@ lintCoreRule fun fun_ty rule@(Rule { ru_name = name, ru_bndrs = bndrs
                      _ -> markAllJoinsBad $ lintCoreExpr rhs
        ; ensureEqTys lhs_ty rhs_ty $
          (rule_doc <+> vcat [ text "lhs type:" <+> ppr lhs_ty
-                            , text "rhs type:" <+> ppr rhs_ty ])
+                            , text "rhs type:" <+> ppr rhs_ty
+                            , text "fun_ty:" <+> ppr fun_ty ])
        ; let bad_bndrs = filter is_bad_bndr bndrs
 
        ; checkL (null bad_bndrs)



More information about the ghc-commits mailing list