Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
For CSV-like and TSV-like data.
- tab :: String
- fromTabbed :: String -> [String]
- toTabbed :: [String] -> String
- fromTabbeds :: String -> [[String]]
- toTabbeds :: [[String]] -> String
- class Listable a b | a -> b where
- fromStringList :: (Listable a b, Stringy b) => [String] -> a
- toStringList :: (Listable a b, Stringy b) => a -> [String]
- fromTabbedList :: (Listable a b, Stringy b) => String -> a
- toTabbedList :: (Listable a b, Stringy b) => a -> String
- fromStringLists :: (Listable a b, Listable b c, Stringy c) => [[String]] -> a
- toStringLists :: (Listable a b, Listable b c, Stringy c) => a -> [[String]]
- fromTabbedLists :: (Listable a b, Listable b c, Stringy c) => String -> a
- toTabbedLists :: (Listable a b, Listable b c, Stringy c) => a -> String
- fromTransposedTabbedLists :: (Listable a b, Listable b c, Stringy c) => String -> a
- toTransposedTabbedLists :: (Listable a b, Listable b c, Stringy c) => a -> String
- class WithHeader a b | a -> b where
- fromStringListsWithHeader :: (WithHeader a b, Listable b c, Stringy c) => [[String]] -> a
- toStringListsWithHeader :: (WithHeader a b, Listable b c, Stringy c) => a -> [[String]]
- fromTabbedListsWithHeader :: (WithHeader a b, Listable b c, Stringy c) => String -> a
- toTabbedListsWithHeader :: (WithHeader a b, Listable b c, Stringy c) => a -> String
- readTabbedListsWithHeader :: (WithHeader a b, Listable b c, Stringy c) => FilePath -> IO a
- writeTabbedListsWithHeader :: (WithHeader a b, Listable b c, Stringy c) => FilePath -> a -> IO ()
- fromTransposedTabbedListsWithHeader :: (WithHeader a b, Listable b c, Stringy c) => String -> a
- toTransposedTabbedListsWithHeader :: (WithHeader a b, Listable b c, Stringy c) => a -> String
- readTransposedTabbedListsWithHeader :: (WithHeader a b, Listable b c, Stringy c) => FilePath -> IO a
- writeTransposedTabbedListsWithHeader :: (WithHeader a b, Listable b c, Stringy c) => FilePath -> a -> IO ()
Tabbed Strings
Separate a tabbed string.
Intercalate tabs between strings.
Separate lines and tabs.
Intercalte lines and tabs.
Converting to/from Lists
Convert from a list of strings.
Convert to a list of strings.
Convert from a tabbed lines.
Convert to a tabbed lines.
Convert from a list of strings.
Convert to a list of strings.
Convert from tabbed lines.
Convert to tabbed lines.
fromTransposedTabbedLists Source #
Convert from transposed tabbed lines.
toTransposedTabbedLists Source #
Convert to transposed tabbed lines.
Dealing with Headers
class WithHeader a b | a -> b where Source #
Class for lists of strings with a headers.
fromHeaderLists :: ([String], [b]) -> a Source #
Convert from a list of values with headers.
toHeaderLists :: a -> ([String], [b]) Source #
fromStringListsWithHeader Source #
:: (WithHeader a b, Listable b c, Stringy c) | |
=> [[String]] | The lists of strings. |
-> a | The value. |
Convert from lists of strings with a header.
toStringListsWithHeader Source #
:: (WithHeader a b, Listable b c, Stringy c) | |
=> a | The value. |
-> [[String]] | The lists of strings. |
Convert to lists of strings with a header.
fromTabbedListsWithHeader Source #
:: (WithHeader a b, Listable b c, Stringy c) | |
=> String | The lines. |
-> a | The value. |
Convert from lines with a header.
toTabbedListsWithHeader Source #
:: (WithHeader a b, Listable b c, Stringy c) | |
=> a | The value. |
-> String | The lines. |
Convert to lines with a header.
readTabbedListsWithHeader Source #
:: (WithHeader a b, Listable b c, Stringy c) | |
=> FilePath | The file. |
-> IO a | Action for reading the value. |
Read lines with a header.
writeTabbedListsWithHeader Source #
:: (WithHeader a b, Listable b c, Stringy c) | |
=> FilePath | The file path. |
-> a | The value. |
-> IO () | The action for writing the value. |
Write lines with a header.
fromTransposedTabbedListsWithHeader Source #
:: (WithHeader a b, Listable b c, Stringy c) | |
=> String | The tabbed lines. |
-> a | The value. |
Convert from tabbed lines with a header.
toTransposedTabbedListsWithHeader Source #
:: (WithHeader a b, Listable b c, Stringy c) | |
=> a | The value. |
-> String | The tabbed lines. |
Convert to tabbed lines with a header.
readTransposedTabbedListsWithHeader Source #
:: (WithHeader a b, Listable b c, Stringy c) | |
=> FilePath | The file path. |
-> IO a | Action for reading the value. |
Read tabbed lines with a header.
writeTransposedTabbedListsWithHeader Source #
:: (WithHeader a b, Listable b c, Stringy c) | |
=> FilePath | The file path. |
-> a | The value. |
-> IO () | The action for writing the value. |
Write tabbed lines with a header.