on master help sign in
`showCG` should be recursive and not use `show`
commit9900e631690d2057d32f925544409ca73e4d2274 authorBrian McKenna <brian@brianmckenna.org> dateFri 29 Nov 2013, 15:48 (13 years ago) parent947766b
1 file changed+6−6
src/Core/TT.hs+6−6
src/Core/TT.hs+6−6
@@ -273,15 +273,15 @@ instance Show SpecialName where
273273-- Show a name in a way decorated for code generation, not human reading
274274showCG :: Name -> String
275275showCG (UN n) = n
276−showCG (NS n s) = showSep "." (reverse s) ++ "." ++ show n
276+showCG (NS n s) = showSep "." (reverse s) ++ "." ++ showCG n
277277showCG (MN _ "underscore") = "_"
278278showCG (MN i s) = "{" ++ s ++ show i ++ "}"
279279showCG (SN s) = showCG' s
280− where showCG' (WhereN i p c) = show p ++ ":" ++ show c ++ ":" ++ show i
281− showCG' (InstanceN cl inst) = '@':show cl ++ '$':showSep ":" inst
282− showCG' (MethodN m) = '!':show m
283− showCG' (ParentN p c) = show p ++ "#" ++ show c
284− showCG' (CaseN c) = show c ++ "_case"
280+ where showCG' (WhereN i p c) = showCG p ++ ":" ++ showCG c ++ ":" ++ show i
281+ showCG' (InstanceN cl inst) = '@':showCG cl ++ '$':showSep ":" inst
282+ showCG' (MethodN m) = '!':showCG m
283+ showCG' (ParentN p c) = showCG p ++ "#" ++ show c
284+ showCG' (CaseN c) = showCG c ++ "_case"
285285showCG NErased = "_"
286286
287287