# HG changeset patch # User Wuzzy # Date 1543703495 -3600 # Node ID 3baee596a9894fa074e9178e1293b6029c279a25 # Parent c2712b142e9d38a0f3e71d9b03dcefc76d6b5482 Apply Pas2C fix suggested by unC0Rr diff -r c2712b142e9d -r 3baee596a989 tools/pas2c/Pas2C.hs --- a/tools/pas2c/Pas2C.hs Sat Dec 01 23:06:28 2018 +0100 +++ b/tools/pas2c/Pas2C.hs Sat Dec 01 23:31:35 2018 +0100 @@ -239,7 +239,7 @@ pascal2C (Program _ implementation mainFunction) = do impl <- implementation2C implementation - [main] <- tvar2C True False True True + main <- liftM head $ tvar2C True False True True (FunctionDeclaration (Identifier "main" (BTInt True)) False False False (SimpleType $ Identifier "int" (BTInt True)) [VarDeclaration False False ([Identifier "argc" (BTInt True)], SimpleType (Identifier "Integer" (BTInt True))) Nothing , VarDeclaration False False ([Identifier "argv" BTUnknown], SimpleType (Identifier "PPChar" BTUnknown)) Nothing]