hsprocess-0.3: The Haskell Stream Processor command line utility

Safe HaskellSafe-Inferred

System.Console.HSProcess.Representable

Synopsis

Documentation

class Show a => Row a whereSource

A Row is something that can be expressed as a line. The output of repr' should be formatted such that it can be read and processed from the command line.

For example:

>>> IO.putStrLn $ show [1,2,3,4]
[1,2,3,4]
>>> Data.ByteString.Lazy.Char8.putStrLn $ repr' [1,2,3,4]
1 2 3 4

Methods

repr' :: a -> ByteStringSource

Instances

Row Bool 
Row Char 
Row Double 
Row Float 
Row Int 
Row Integer 
Row () 
Row ByteString 
ListAsRow a => Row [a] 
Row a => Row (Maybe a) 
ListAsRow a => Row (Set a) 
(Row a, Row b) => Row (a, b) 
(Row a, Row b) => Row (Map a b) 
(Row a, Row b, Row c) => Row (a, b, c) 

class Show a => Rows a whereSource

A type that instantiate Rows is a type that can be represented as a list of rows, where typically a row is a line.

For example:

>>> mapM_ Data.ByteString.Lazy.Char8.putStrLn $ repr [1,2,3,4]
1
2
3
4

Methods

repr :: a -> [ByteString]Source

Instances

Rows Bool 
Rows Char 
Rows Double 
Rows Float 
Rows Int 
Rows Integer 
Rows () 
Rows ByteString 
ListAsRows a => Rows [a] 
Rows a => Rows (Maybe a) 
ListAsRows a => Rows (Set a) 
(Row a, Row b) => Rows (a, b) 
(Row a, Row b) => Rows (Map a b) 

printRows :: forall a. Rows a => Bool -> a -> IO ()Source

printRow :: forall a. Row a => Bool -> a -> IO ()Source