diff options
-rw-r--r-- | src/Compile.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Compile.hs b/src/Compile.hs index 6e46f74..908b304 100644 --- a/src/Compile.hs +++ b/src/Compile.hs @@ -352,21 +352,21 @@ compileToString env expr = ,compose [printStructDecl sd . showString "\n" | sd <- structs] ,showString "\n" ,showString "static void* malloc_instr(size_t n) {\n" - ,showString " void *ptr = malloc(n);" + ,showString " void *ptr = malloc(n);\n" ,if debugAllocs then showString "printf(\"[chad-kernel] malloc(%zu) -> %p\\n\", n, ptr);\n" else id - ,showString " return ptr;" + ,showString " return ptr;\n" ,showString "}\n" ,showString "static void* calloc_instr(size_t n) {\n" - ,showString " void *ptr = calloc(n, 1);" + ,showString " void *ptr = calloc(n, 1);\n" ,if debugAllocs then showString "printf(\"[chad-kernel] calloc(%zu) -> %p\\n\", n, ptr);\n" else id - ,showString " return ptr;" + ,showString " return ptr;\n" ,showString "}\n" ,showString "static void free_instr(void *ptr) {\n" ,if debugAllocs then showString "printf(\"[chad-kernel] free(%p)\\n\", ptr);\n" else id - ,showString " free(ptr);" + ,showString " free(ptr);\n" ,showString "}\n\n" ,compose [showString str . showString "\n\n" | str <- toList (csTopLevelDecls s)] ,showString $ |