projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2de9393
)
Make the arity and strictness agree, for wired-in bottoming Ids
author
simonpj@microsoft.com
<unknown>
Thu, 10 Apr 2008 08:26:19 +0000
(08:26 +0000)
committer
simonpj@microsoft.com
<unknown>
Thu, 10 Apr 2008 08:26:19 +0000
(08:26 +0000)
compiler/basicTypes/MkId.lhs
patch
|
blob
|
history
diff --git
a/compiler/basicTypes/MkId.lhs
b/compiler/basicTypes/MkId.lhs
index
a9c4e02
..
3e63c31
100644
(file)
--- a/
compiler/basicTypes/MkId.lhs
+++ b/
compiler/basicTypes/MkId.lhs
@@
-1314,10
+1314,14
@@
pcMiscPrelId name ty info
-- will be in "the right place" to be in scope.
pc_bottoming_Id :: Name -> Type -> Id
-- will be in "the right place" to be in scope.
pc_bottoming_Id :: Name -> Type -> Id
+-- Function of arity 1, which diverges after being given one argument
pc_bottoming_Id name ty
= pcMiscPrelId name ty bottoming_info
where
bottoming_info = vanillaIdInfo `setAllStrictnessInfo` Just strict_sig
pc_bottoming_Id name ty
= pcMiscPrelId name ty bottoming_info
where
bottoming_info = vanillaIdInfo `setAllStrictnessInfo` Just strict_sig
+ `setArityInfo` 1
+ -- Make arity and strictness agree
+
-- Do *not* mark them as NoCafRefs, because they can indeed have
-- CAF refs. For example, pAT_ERROR_ID calls GHC.Err.untangle,
-- which has some CAFs
-- Do *not* mark them as NoCafRefs, because they can indeed have
-- CAF refs. For example, pAT_ERROR_ID calls GHC.Err.untangle,
-- which has some CAFs
@@
-1327,7
+1331,7
@@
pc_bottoming_Id name ty
-- any pc_bottoming_Id will itself have CafRefs, which bloats
-- SRTs.
-- any pc_bottoming_Id will itself have CafRefs, which bloats
-- SRTs.
- strict_sig = mkStrictSig (mkTopDmdType [evalDmd] BotRes)
+ strict_sig = mkStrictSig (mkTopDmdType [evalDmd] BotRes)
-- These "bottom" out, no matter what their arguments
\end{code}
-- These "bottom" out, no matter what their arguments
\end{code}