@@ -220,11 +220,11 @@ bcc i (CASE True r code def)
220220 indent i ++ "}\n"
221221
222222 showCase :: Int -> Maybe [BC] -> [(Int, [BC])] -> String
223− showCase i Nothing [(t, c)] = showCode i c
224− showCase i (Just def) [] = showCode i def
223+ showCase i Nothing [(t, c)] = indent i ++ showCode i c
224+ showCase i (Just def) [] = indent i ++ showCode i def
225225 showCase i def ((t, c) : cs)
226226 = indent i ++ "if (CTAG(" ++ creg r ++ ") == " ++ show t ++ ") " ++ showCode i c
227− ++ indent i ++ "else " ++ showCase i def cs
227+ ++ indent i ++ "else\n" ++ showCase i def cs
228228
229229bcc i (CASE safe r code def)
230230 = indent i ++ "switch(" ++ ctag safe ++ "(" ++ creg r ++ ")) {\n" ++
@@ -307,7 +307,7 @@ bcc i (FOREIGNCALL l rty (FStr fn) args)
307307 (fn ++ "(" ++ showSep "," (map fcall args) ++ ")") ++ ";\n"
308308 where fcall (t, arg) = irts_c (toFType t) (creg arg)
309309bcc i (NULL r) = indent i ++ creg r ++ " = NULL;\n" -- clear, so it'll be GCed
310−bcc i (ERROR str) = indent i ++ "fprintf(stderr, " ++ show str ++ "); fprintf(stderr, \"\\n\"); exit(-1); exit(-1);"
310+bcc i (ERROR str) = indent i ++ "fprintf(stderr, " ++ show str ++ "); fprintf(stderr, \"\\n\"); exit(-1);\n"
311311-- bcc i c = error (show c) -- indent i ++ "// not done yet\n"
312312
313313-- Deconstruct the Foreign type in the defunctionalised expression and build