projects
/
matthijs
/
master-project
/
cλash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow references to global values without arguments.
[matthijs/master-project/cλash.git]
/
Flatten.hs
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)
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)
otherwise ->
error $ "Ids other than local vars and dataconstructors not supported: " ++ (showSDoc $ ppr id)