summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2017-12-27 19:47:50 +0100
committerGabor Greif <ggreif@gmail.com>2017-12-28 10:45:24 +0100
commit878936583905e3f1506fa65dbd86549f82ef4aa3 (patch)
tree4b7b408f01c373079bc8dd4213c5e8a395bb1bc9
parentf2db228bd1fc8295581080ac25d378be72e7b600 (diff)
downloadhaskell-878936583905e3f1506fa65dbd86549f82ef4aa3.tar.gz
WIP: don't reenter WHNF thing for re-tagging
this is a very crude test. How to make it more robust?
-rw-r--r--compiler/codeGen/StgCmmClosure.hs15
1 files changed, 12 insertions, 3 deletions
diff --git a/compiler/codeGen/StgCmmClosure.hs b/compiler/codeGen/StgCmmClosure.hs
index 2501ec9cbd..feb998763d 100644
--- a/compiler/codeGen/StgCmmClosure.hs
+++ b/compiler/codeGen/StgCmmClosure.hs
@@ -1,5 +1,5 @@
-{-# LANGUAGE CPP, RecordWildCards #-}
-
+{-# LANGUAGE CPP, RecordWildCards, StandaloneDeriving #-}
+{-# OPTIONS_GHC -Wno-orphans #-}
-----------------------------------------------------------------------------
--
-- Stg to C-- code generation:
@@ -223,8 +223,13 @@ data LambdaFormInfo
-- always a value, needs evaluation
| LFLetNoEscape -- See LetNoEscape module for precise description
+ deriving Show
-
+deriving instance Show TopLevelFlag
+deriving instance Show OneShotInfo
+deriving instance Show ArgDescr
+deriving instance Show StandardFormInfo
+instance Show DataCon where show _ = "<DATACON>"
-------------------------
-- StandardFormInfo tells whether this thunk has one of
-- a small number of standard forms
@@ -581,6 +586,10 @@ getCallMethod dflags name id (LFReEntrant _ _ arity _ _) n_args _v_args _cg_loc
getCallMethod _ _name _ LFUnlifted n_args _v_args _cg_loc _self_loop_info
= ASSERT( n_args == 0 ) ReturnIt
+getCallMethod _ name id (LFUnknown False) 0 _v_args cg_loc _self_loop_info
+ | occNameString (nameOccName name) == "wild"
+ = pprTrace "getCallMethod" (ppr id <+> ppr cg_loc) ReturnIt
+
getCallMethod _ _name _ (LFCon _) n_args _v_args _cg_loc _self_loop_info
= ASSERT( n_args == 0 ) ReturnIt
-- n_args=0 because it'd be ill-typed to apply a saturated