raft-0.3.7.0: Miscellaneous Haskell utilities for data structures and data manipulation.

Safe HaskellSafe
LanguageHaskell2010

Data.Table

Contents

Description

Deprecated: This module will be replaced in a future release.

Tables of data.

Synopsis

Tables

class Tabulatable a where Source #

Class for tables with headers and records of fields.

Minimal complete definition

labels, tabulation, untabulation

Methods

labels :: a -> [String] Source #

Retrieve the header.

tabulation :: a -> [String] Source #

Retrieve the fields for a record.

tabulations :: [a] -> [[String]] Source #

Retrieve the fields for records.

tabulationsT :: [a] -> [[String]] Source #

Retrieve and transpose the fields for records.

tabulations' :: [a] -> String Source #

Retrieve the fields for records as tabbed lines.

tabulationsT' :: [a] -> String Source #

Retrieve the fields for records as transposed tabbed lines.

untabulation :: [String] -> a Source #

Make a record from a string for the fields.

untabulations :: [[String]] -> [a] Source #

Make records from strings for the fields.

untabulations' :: String -> [a] Source #

Make records from tabbed lines for the fields.

sorted :: [a] -> [a] Source #

Sort the tabulation.

find :: a -> [a] -> Maybe a Source #

Find a field in the tabulation.

readUncompressed :: FilePath -> IO [a] Source #

Read from a file.

readCompressed :: FilePath -> IO [a] Source #

Read from a compressed file.

writeUncompressed :: FilePath -> [a] -> IO () Source #

Write to a file.

writeCompressed :: FilePath -> [a] -> IO () Source #

Write to a compressed file.

Instances

(Read a, Show a) => Tabulatable (Id a) Source # 
Tabulatable (Id String) Source # 

labels1 Source #

Arguments

:: Tabulatable a 
=> String

An additional column label.

-> a

The first tabulation.

-> [String]

The collated header.

Collate the headers from a tabulation.

tabulation1 Source #

Arguments

:: (Tabulatable a, Show e) 
=> a

The tabulation.

-> e

An additional column.

-> [String]

The list of string representations.

Collate and show a tabulation.

labels2 Source #

Arguments

:: (Tabulatable a, Tabulatable b) 
=> String

An additional column label.

-> a

The first tabulation.

-> b

The second tabulation.

-> [String]

The collated header.

Collate the headers from two tabulations.

tabulation2 Source #

Arguments

:: (Tabulatable a, Tabulatable b, Show e) 
=> a

The first tabulation.

-> b

The second tabulation.

-> e

An additional column.

-> [String]

The list of string representations.

Collate and show two tabulations.

labels3 Source #

Arguments

:: (Tabulatable a, Tabulatable b, Tabulatable c) 
=> String

An additional column label.

-> a

The first tabulation.

-> b

The second tabulation.

-> c

The third tabulation.

-> [String]

The collated header.

Collate the headers from three tabulations.

tabulation3 Source #

Arguments

:: (Tabulatable a, Tabulatable b, Tabulatable c, Show e) 
=> a

The first tabulation.

-> b

The second tabulation.

-> c

The third tabulation.

-> e

An additional column.

-> [String]

The list of string representations.

Collate and show three tabulations.