Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
- (./) :: (a -> [a1]) -> (a1 -> [b]) -> a -> [b]
- (/<>) :: (a -> b) -> (b -> Bool) -> a -> [b]
- (->//) :: [a] -> (a -> [b]) -> [b]
- starBlocks :: STAR -> [STARBlock]
- filterP :: (t -> Bool) -> t -> [t]
- blocksByName :: String -> STAR -> [STAREntry]
- entriesByName :: String -> STAREntry -> [STAREntry]
- entryValue :: STAREntry -> [String]
- allEntriesByName :: String -> STAR -> [String]
- flattenEntries :: STAREntry -> [STAREntry]
Documentation
(./) :: (a -> [a1]) -> (a1 -> [b]) -> a -> [b] infixr 3 Source
This module presents a convenient, compositional interface for filtering Example use: > test1 :: STAR -> [String] > test1 = blocksByName "" . entriesByName "chemical_shifts" . entryValue Another example: > test2 :: STAR -> [String] > test2 = starBlocks . entries . entryValue
Path separator - serves as general function composition operator.
(/<>) :: (a -> b) -> (b -> Bool) -> a -> [b] Source
Path predicate operator - serves as general function composition operator.
(->//) :: [a] -> (a -> [b]) -> [b] infixl 1 Source
Applies a path to a set of elements (not just a document, or single entry.)
starBlocks :: STAR -> [STARBlock] Source
blocksByName :: String -> STAR -> [STAREntry] Source
Selects all block matching a given name or GLOBAL block for empty string. TODO: Regex for names?
entriesByName :: String -> STAREntry -> [STAREntry] Source
Filter entries with a given name. Expand loops if necessary.
entryValue :: STAREntry -> [String] Source
Extracts a string value from a flat entry.
allEntriesByName :: String -> STAR -> [String] Source
Find all flat entries with a given name, and return their values.
flattenEntries :: STAREntry -> [STAREntry] Source
Expands a possibly complex entry into a list of flat entries.