projects
/
matthijs
/
master-project
/
cλash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03e4615
)
Allow references to global values without arguments.
author
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Thu, 9 Apr 2009 16:03:13 +0000
(18:03 +0200)
committer
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Thu, 9 Apr 2009 16:03:13 +0000
(18:03 +0200)
These references are treated as function applications without arguments.
Flatten.hs
patch
|
blob
|
history
diff --git
a/Flatten.hs
b/Flatten.hs
index d38443b0c8609c2885dfed753693d9f2fdbbdfc1..8d2d5b62b50053c96afb4b384b0ebd6ce3b66341 100644
(file)
--- a/
Flatten.hs
+++ b/
Flatten.hs
@@
-170,6
+170,9
@@
flattenExpr binds var@(Var id) =
addNameHint (Name.getOccString id) sig_id
addDef (UncondDef (Right $ Literal lit) sig_id)
return ([], Single sig_id)
+ IdInfo.VanillaGlobal ->
+ -- Treat references to globals as an application with zero elements
+ flattenApplicationExpr binds (CoreUtils.exprType var) id []
otherwise ->
error $ "Ids other than local vars and dataconstructors not supported: " ++ (showSDoc $ ppr id)