1
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
2
-----------------------------------------------------------------------------
5
-- Copyright : (c) The University of Glasgow 2001
6
-- License : BSD-style (see the file libraries/base/LICENSE)
8
-- Maintainer : libraries@haskell.org
9
-- Stability : provisional
10
-- Portability : portable
12
-- Converting values to readable strings:
13
-- the 'Show' class and associated functions.
15
-----------------------------------------------------------------------------
18
ShowS, -- String -> String
20
showsPrec, -- :: Int -> a -> ShowS
21
show, -- :: a -> String
22
showList -- :: [a] -> ShowS
24
shows, -- :: (Show a) => a -> ShowS
25
showChar, -- :: Char -> ShowS
26
showString, -- :: String -> ShowS
27
showParen, -- :: Bool -> ShowS -> ShowS
28
showListWith, -- :: (a -> ShowS) -> [a] -> ShowS
31
#ifdef __GLASGOW_HASKELL__
35
-- | Show a list (using square brackets and commas), given a function
36
-- for showing elements.
37
showListWith :: (a -> ShowS) -> [a] -> ShowS
38
showListWith = showList__
40
#ifndef __GLASGOW_HASKELL__
41
showList__ :: (a -> ShowS) -> [a] -> ShowS
42
showList__ _ [] s = "[]" ++ s
43
showList__ showx (x:xs) s = '[' : showx x (showl xs)
46
showl (y:ys) = ',' : showx y (showl ys)