X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=Flatten.hs;h=8d2d5b62b50053c96afb4b384b0ebd6ce3b66341;hb=cba9bc73cb53261fd0a60dc90b3b470e541de608;hp=d38443b0c8609c2885dfed753693d9f2fdbbdfc1;hpb=03e46158a8ea69979132eb4fd9138038fbd9fee0;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git 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)