Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
21b05036
Commit
21b05036
authored
Sep 23, 2010
by
simonpj@microsoft.com
Browse files
Allow absent State# RealWorld arguments
parent
66413c79
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/stranal/WwLib.lhs
View file @
21b05036
...
...
@@ -20,6 +20,7 @@ import Demand ( Demand(..), DmdResult(..), Demands(..) )
import MkCore ( mkRuntimeErrorApp, aBSENT_ERROR_ID )
import MkId ( realWorldPrimId, voidArgId,
mkUnpackCase, mkProductBox )
import TysPrim ( realWorldStatePrimTy )
import TysWiredIn ( tupleCon )
import Type
import Coercion ( mkSymCoercion, splitNewTypeRepCo_maybe )
...
...
@@ -524,8 +525,10 @@ mk_absent_let arg
| Just (tc, _) <- splitTyConApp_maybe arg_ty
, Just lit <- absentLiteralOf tc
= Just (Let (NonRec arg (Lit lit)))
| arg_ty `coreEqType` realWorldStatePrimTy
= Just (Let (NonRec arg (Var realWorldPrimId)))
| otherwise
= WARN( True, ptext (sLit "No a
s
bent value for") <+> ppr arg_ty )
= WARN( True, ptext (sLit "No ab
s
ent value for") <+> ppr arg_ty )
Nothing
where
arg_ty = idType arg
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment