hgeometry-ipe-0.9.0.0: Reading and Writing ipe7 files.

Safe HaskellNone
LanguageHaskell2010

Data.Geometry.Ipe.PathParser

Synopsis

Documentation

class Fractional r => Coordinate r where Source #

Represent stuff that can be used as a coordinate in ipe. (similar to show/read)

Minimal complete definition

Nothing

Methods

fromSeq :: Integer -> Maybe (Int, Integer) -> r Source #

fromSeq :: (Ord r, Fractional r) => Integer -> Maybe (Int, Integer) -> r Source #

Instances
Coordinate Double Source # 
Instance details

Defined in Data.Geometry.Ipe.PathParser

Coordinate (Ratio Integer) Source # 
Instance details

Defined in Data.Geometry.Ipe.PathParser

readCoordinate :: Coordinate r => Text -> Either Text r Source #

Running the parsers

readPoint :: Coordinate r => Text -> Either Text (Point 2 r) Source #

data Either' l r Source #

Constructors

Left' l 
Right' r 
Instances
(Eq l, Eq r) => Eq (Either' l r) Source # 
Instance details

Defined in Data.Geometry.Ipe.PathParser

Methods

(==) :: Either' l r -> Either' l r -> Bool #

(/=) :: Either' l r -> Either' l r -> Bool #

(Show l, Show r) => Show (Either' l r) Source # 
Instance details

Defined in Data.Geometry.Ipe.PathParser

Methods

showsPrec :: Int -> Either' l r -> ShowS #

show :: Either' l r -> String #

showList :: [Either' l r] -> ShowS #

(Semigroup l, Semigroup r) => Semigroup (Either' l r) Source # 
Instance details

Defined in Data.Geometry.Ipe.PathParser

Methods

(<>) :: Either' l r -> Either' l r -> Either' l r #

sconcat :: NonEmpty (Either' l r) -> Either' l r #

stimes :: Integral b => b -> Either' l r -> Either' l r #

(Semigroup l, Semigroup r, Monoid r) => Monoid (Either' l r) Source # 
Instance details

Defined in Data.Geometry.Ipe.PathParser

Methods

mempty :: Either' l r #

mappend :: Either' l r -> Either' l r -> Either' l r #

mconcat :: [Either' l r] -> Either' l r #

either' :: (l -> a) -> (r -> a) -> Either' l r -> a 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

pPoint :: Coordinate r => Parser (Point 2 r) Source #

pRectangle :: Coordinate r => Parser (Rectangle () r) Source #

pMatrix :: Coordinate r => Parser (Matrix 3 3 r) Source #

mkMatrix :: Coordinate r => [r] -> Matrix 3 3 r Source #

Generate a matrix from a list of 6 coordinates.