--- 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]