[Git][ghc/ghc][wip/backports] CorePrep: Print type if we fail to split
Ben Gamari
gitlab at gitlab.haskell.org
Tue Jun 2 14:07:27 UTC 2020
Ben Gamari pushed to branch wip/backports at Glasgow Haskell Compiler / GHC
Commits:
540d5562 by Ben Gamari at 2020-06-02T10:07:07-04:00
CorePrep: Print type if we fail to split
- - - - -
1 changed file:
- compiler/coreSyn/CorePrep.hs
Changes:
=====================================
compiler/coreSyn/CorePrep.hs
=====================================
@@ -927,8 +927,10 @@ cpeApp top_env expr
(_ : ss_rest, True) -> (topDmd, ss_rest)
(ss1 : ss_rest, False) -> (ss1, ss_rest)
([], _) -> (topDmd, [])
- (arg_ty, res_ty) = expectJust "cpeBody:collect_args" $
- splitFunTy_maybe fun_ty
+ (arg_ty, res_ty) =
+ case splitFunTy_maybe fun_ty of
+ Just as -> as
+ Nothing -> pprPanic "cpeBody" (ppr fun_ty $$ ppr expr)
(fs, arg') <- cpeArg top_env ss1 arg arg_ty
rebuild_app as (App fun' arg') res_ty (fs `appendFloats` floats) ss_rest
CpeCast co ->
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/540d5562f323eabdc2b80ba1520be312b88ab8ae
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/540d5562f323eabdc2b80ba1520be312b88ab8ae
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200602/fda8f309/attachment.html>
More information about the ghc-commits
mailing list