on master help sign in
`showCG` should be recursive and not use `show`
9900e63Brian McKenna
src/Core/TT.hs+6−6
@@ -273,15 +273,15 @@ instance Show SpecialName where
273-- Show a name in a way decorated for code generation, not human reading
273-- Show a name in a way decorated for code generation, not human reading
274showCG :: Name -> String
274showCG :: Name -> String
275showCG (UN n) = n
275showCG (UN n) = n
276−showCG (NS n s) = showSep "." (reverse s) ++ "." ++ show n
276+showCG (NS n s) = showSep "." (reverse s) ++ "." ++ showCG n
277showCG (MN _ "underscore") = "_"
277showCG (MN _ "underscore") = "_"
278showCG (MN i s) = "{" ++ s ++ show i ++ "}"
278showCG (MN i s) = "{" ++ s ++ show i ++ "}"
279showCG (SN s) = showCG' s
279showCG (SN s) = showCG' s
280− where showCG' (WhereN i p c) = show p ++ ":" ++ show c ++ ":" ++ show i
280+ where showCG' (WhereN i p c) = showCG p ++ ":" ++ showCG c ++ ":" ++ show i
281− showCG' (InstanceN cl inst) = '@':show cl ++ '$':showSep ":" inst
281+ showCG' (InstanceN cl inst) = '@':showCG cl ++ '$':showSep ":" inst
282− showCG' (MethodN m) = '!':show m
282+ showCG' (MethodN m) = '!':showCG m
283− showCG' (ParentN p c) = show p ++ "#" ++ show c
283+ showCG' (ParentN p c) = showCG p ++ "#" ++ show c
284− showCG' (CaseN c) = show c ++ "_case"
284+ showCG' (CaseN c) = showCG c ++ "_case"
285showCG NErased = "_"
285showCG NErased = "_"
286
286
287
287