Skip to content
Snippets Groups Projects
Commit 4c177fb1 authored by sof's avatar sof
Browse files

[project @ 1998-04-30 19:49:01 by sof]

Use , as element separator in lists and tuples not comma followed by space (important stuffcvs-diff PrelBase.lhs)
parent 8592c893
No related merge requests found
......@@ -759,7 +759,7 @@ showList__ showx [] = showString "[]"
showList__ showx (x:xs) = showChar '[' . showx x . showl xs
where
showl [] = showChar ']'
showl (x:xs) = showString ", " . showx x . showl xs
showl (x:xs) = showChar ',' . showx x . showl xs
showSpace :: ShowS
showSpace = {-showChar ' '-} \ xs -> ' ' : xs
......
......@@ -86,29 +86,29 @@ data (,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r
\begin{code}
instance (Show a, Show b) => Show (a,b) where
showsPrec p (x,y) = showChar '(' . shows x . showString ", " .
showsPrec p (x,y) = showChar '(' . shows x . showChar ',' .
shows y . showChar ')'
showList = showList__ (showsPrec 0)
instance (Show a, Show b, Show c) => Show (a, b, c) where
showsPrec p (x,y,z) = showChar '(' . showsPrec 0 x . showString ", " .
showsPrec 0 y . showString ", " .
showsPrec p (x,y,z) = showChar '(' . showsPrec 0 x . showChar ',' .
showsPrec 0 y . showChar ',' .
showsPrec 0 z . showChar ')'
showList = showList__ (showsPrec 0)
instance (Show a, Show b, Show c, Show d) => Show (a, b, c, d) where
showsPrec p (w,x,y,z) = showChar '(' . showsPrec 0 w . showString ", " .
showsPrec 0 x . showString ", " .
showsPrec 0 y . showString ", " .
showsPrec p (w,x,y,z) = showChar '(' . showsPrec 0 w . showChar ',' .
showsPrec 0 x . showChar ',' .
showsPrec 0 y . showChar ',' .
showsPrec 0 z . showChar ')'
showList = showList__ (showsPrec 0)
instance (Show a, Show b, Show c, Show d, Show e) => Show (a, b, c, d, e) where
showsPrec p (v,w,x,y,z) = showChar '(' . showsPrec 0 v . showString ", " .
showsPrec 0 w . showString ", " .
showsPrec 0 x . showString ", " .
showsPrec 0 y . showString ", " .
showsPrec p (v,w,x,y,z) = showChar '(' . showsPrec 0 v . showChar ',' .
showsPrec 0 w . showChar ',' .
showsPrec 0 x . showChar ',' .
showsPrec 0 y . showChar ',' .
showsPrec 0 z . showChar ')'
showList = showList__ (showsPrec 0)
\end{code}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment