Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class Num r => Coordinate r where
- defaultFromSeq :: (Ord r, Fractional r) => Integer -> Maybe Integer -> r
- readCoordinate :: Coordinate r => Text -> Either Text r
- readPoint :: Coordinate r => Text -> Either Text (Point 2 r)
- runParser :: Parser a -> Text -> Either Text a
- data Either' l r
- either' :: (l -> a) -> (r -> a) -> Either' l r -> a
- readPathOperations :: Coordinate r => Text -> Either Text [Operation r]
- errorText :: ParseError -> Text
- combineErrors :: [ParseError] -> Text
- splitKeepDelims :: [Char] -> Text -> [Text]
- readMatrix :: Coordinate r => Text -> Either Text (Matrix 3 3 r)
- readRectangle :: Coordinate r => Text -> Either Text (Rectangle () r)
- pOperation :: Coordinate r => Parser (Operation r)
- pPoint :: Coordinate r => Parser (Point 2 r)
- pCoordinate :: Coordinate r => Parser r
- pRectangle :: Coordinate r => Parser (Rectangle () r)
- pMatrix :: Coordinate r => Parser (Matrix 3 3 r)
- mkMatrix :: Coordinate r => [r] -> Matrix 3 3 r
Documentation
class Num r => Coordinate r where Source #
Represent stuff that can be used as a coordinate in ipe. (similar to show/read)
defaultFromSeq :: (Ord r, Fractional r) => Integer -> Maybe Integer -> r Source #
readCoordinate :: Coordinate r => Text -> Either Text r Source #
Running the parsers
readPathOperations :: Coordinate r => Text -> Either Text [Operation r] Source #
errorText :: ParseError -> Text Source #
combineErrors :: [ParseError] -> Text Source #
readMatrix :: Coordinate r => Text -> Either Text (Matrix 3 3 r) Source #
readRectangle :: Coordinate r => Text -> Either Text (Rectangle () r) Source #
pOperation :: Coordinate r => Parser (Operation r) Source #
The parsers themselves
pCoordinate :: Coordinate r => Parser r Source #
pRectangle :: Coordinate r => Parser (Rectangle () r) Source #
mkMatrix :: Coordinate r => [r] -> Matrix 3 3 r Source #
Generate a matrix from a list of 6 coordinates.