on master help sign in
Improve the Show instance for LCase.
acd4c7eMatus Tejiscak
src/IRTS/Lang.hs+2−2
@@ -228,8 +228,8 @@ instance Show LExp where
228 show' (env ++ (map show args)) e
228 show' (env ++ (map show args)) e
229 show' env (LProj t i) = show t ++ "!" ++ show i
229 show' env (LProj t i) = show t ++ "!" ++ show i
230 show' env (LCon i n args) = show n ++ ")" ++ showSep ", " (map (show' env) args) ++ ")"
230 show' env (LCon i n args) = show n ++ ")" ++ showSep ", " (map (show' env) args) ++ ")"
231− show' env (LCase e alts) = "case " ++ show' env e ++ " of {\n\t" ++
231+ show' env (LCase e alts) = "case " ++ show' env e ++ " of \n" ++
232− showSep "\n\t| " (map (showAlt env) alts)
232+ unlines (map (("\t | " ++) . showAlt env) alts)
233 show' env (LConst c) = show c
233 show' env (LConst c) = show c
234 show' env (LForeign lang ty n args) = concat
234 show' env (LForeign lang ty n args) = concat
235 [ "foreign{ "
235 [ "foreign{ "