[commit: ghc] wip/nested-cpr: Turn "non-algebraic or open body type" back into a warning (73d9daa)

git at git.haskell.org git at git.haskell.org
Wed Dec 4 13:17:46 UTC 2013


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

On branch  : wip/nested-cpr
Link       : http://ghc.haskell.org/trac/ghc/changeset/73d9daa4f0d30ac9d950a58f850711a7fe5b5abd/ghc

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

commit 73d9daa4f0d30ac9d950a58f850711a7fe5b5abd
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Wed Dec 4 09:55:04 2013 +0000

    Turn "non-algebraic or open body type" back into a warning


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

73d9daa4f0d30ac9d950a58f850711a7fe5b5abd
 compiler/stranal/WwLib.lhs |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/compiler/stranal/WwLib.lhs b/compiler/stranal/WwLib.lhs
index 4f2e68b..ffc7d4c 100644
--- a/compiler/stranal/WwLib.lhs
+++ b/compiler/stranal/WwLib.lhs
@@ -584,8 +584,10 @@ mkWWcpr_help inner ty res
                     , \e body -> mkUnpackCase e co work_uniq data_con arg_vars (nested_decon body)
                     )
             |  otherwise
-            -> pprPanic "mkWWcpr:" $ ptext (sLit "non-algebraic or open body type") <+>
-                                     (ppr ty) <+> ptext (sLit "but CPR type") <+> ppr (res)
+            -> -- I would be happier if this were a error, but there are nasty corner cases.
+               WARN ( True, ptext (sLit "mkWwcpr: non-algebraic or open body type") <+>
+                                  (ppr ty) <+> ptext (sLit "but CPR type") <+> ppr (res) )
+               mkWWcpr_help inner ty topRes
         Nothing -> do
            uniq <- getUniqueM
            let var = mk_ww_local uniq ty



More information about the ghc-commits mailing list