1 {-# LANGUAGE CPP, NoImplicitPrelude #-}
3 -----------------------------------------------------------------------------
6 -- Copyright : (c) The University of Glasgow 2001
7 -- License : BSD-style (see the file libraries/base/LICENSE)
9 -- Maintainer : libraries@haskell.org
10 -- Stability : provisional
11 -- Portability : portable
13 -- Converting values to readable strings:
14 -- the 'Show' class and associated functions.
16 -----------------------------------------------------------------------------
19 ShowS, -- String -> String
21 showsPrec, -- :: Int -> a -> ShowS
22 show, -- :: a -> String
23 showList -- :: [a] -> ShowS
25 shows, -- :: (Show a) => a -> ShowS
26 showChar, -- :: Char -> ShowS
27 showString, -- :: String -> ShowS
28 showParen, -- :: Bool -> ShowS -> ShowS
29 showListWith, -- :: (a -> ShowS) -> [a] -> ShowS
32 #ifdef __GLASGOW_HASKELL__
36 -- | Show a list (using square brackets and commas), given a function
37 -- for showing elements.
38 showListWith :: (a -> ShowS) -> [a] -> ShowS
39 showListWith = showList__
41 #ifndef __GLASGOW_HASKELL__
42 showList__ :: (a -> ShowS) -> [a] -> ShowS
43 showList__ _ [] s = "[]" ++ s
44 showList__ showx (x:xs) s = '[' : showx x (showl xs)
47 showl (y:ys) = ',' : showx y (showl ys)