Safe Haskell | Safe |
---|
Some data structures and functions related to stops and lines.
Data types
data LineTable
Description of a line.
LineTable | |
|
Show LineTable |
Parsing of stop/line files
readStops ∷ FilePath → IO (Either String ([Stop], Trie Char))
Tries to read a list of stops from the given file.
If the list is read successfully, then a trie with all the stop names is returned along with the list.
If an error is encountered, then an error message is returned
(
).Left
msg
∷ Trie Char | Known stop names. If an unknown stop is encountered, then an error message is returned. |
→ FilePath | |
→ IO (Either String [LineTable]) |
Tries to read information about lines from the given file.
If an error is encountered, then an error message is returned
(
).Left
msg
Tries
data Trie a
Tries.