From cba9bc73cb53261fd0a60dc90b3b470e541de608 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Thu, 9 Apr 2009 18:03:13 +0200 Subject: [PATCH] Allow references to global values without arguments. These references are treated as function applications without arguments. --- Flatten.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Flatten.hs b/Flatten.hs index d38443b..8d2d5b6 100644 --- 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) -- 2.30.2