Copyright | (c) 2014 Josh Kirklin |
---|---|
License | MIT |
Maintainer | jjvk2@cam.ac.uk |
Safe Haskell | None |
Language | Haskell2010 |
This module's main export is parseNeedle
, which parses a needle diagram into a NeedleArrow
.
- data NeedleArrow
- = Input Int Int
- | Through (Maybe NeedleArrow) Text
- | Join [NeedleArrow]
- parseNeedle :: String -> Either NeedleError NeedleArrow
- data NeedleError
- presentNeedleError :: NeedleError -> String
Parsing needles
data NeedleArrow Source
The datatype representing a generic needle arrow.
parseNeedle :: String -> Either NeedleError NeedleArrow Source
Parse a string to a needle
Errors
data NeedleError Source
Errors in parsing.
presentNeedleError :: NeedleError -> String Source
Present the error.