| Copyright | (c) 2014 Josh Kirklin |
|---|---|
| License | MIT |
| Maintainer | jjvk2@cam.ac.uk |
| Safe Haskell | None |
| Language | Haskell2010 |
Control.Arrow.Needle.Parse
Contents
Description
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.
Constructors
| Input Int Int | |
| Through (Maybe NeedleArrow) Text | |
| Join [NeedleArrow] |
Instances
parseNeedle :: String -> Either NeedleError NeedleArrow Source
Parse a string to a needle
Errors
data NeedleError Source
Errors in parsing.
Constructors
| ParseError String | |
| ConstructionError String |
Instances
presentNeedleError :: NeedleError -> String Source
Present the error.