hgeometry-combinatorial
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageGHC2021

HGeometry.YAML

Description

 
Synopsis

Documentation

encodeYAML :: ToYAML a => a -> ByteString Source #

Write the output to yaml

encodeYAMLFile :: ToYAML a => OsPath -> a -> IO () Source #

Encode a yaml file

decodeYAML :: FromYAML a => ByteString -> Either (Pos, String) a Source #

alias for decodeEither' from the YAML Package

decodeYAMLFile :: FromYAML a => OsPath -> IO (Either (Pos, String) a) Source #

alias for reading a yaml file

printYAML :: ToYAML a => a -> IO () Source #

Prints the yaml

data Versioned a Source #

Data type for things that have a version

Constructors

Versioned Version a 

Instances

Instances details
Functor Versioned Source # 
Instance details

Defined in HGeometry.YAML

Methods

fmap :: (a -> b) -> Versioned a -> Versioned b #

(<$) :: a -> Versioned b -> Versioned a #

Foldable Versioned Source # 
Instance details

Defined in HGeometry.YAML

Methods

fold :: Monoid m => Versioned m -> m #

foldMap :: Monoid m => (a -> m) -> Versioned a -> m #

foldMap' :: Monoid m => (a -> m) -> Versioned a -> m #

foldr :: (a -> b -> b) -> b -> Versioned a -> b #

foldr' :: (a -> b -> b) -> b -> Versioned a -> b #

foldl :: (b -> a -> b) -> b -> Versioned a -> b #

foldl' :: (b -> a -> b) -> b -> Versioned a -> b #

foldr1 :: (a -> a -> a) -> Versioned a -> a #

foldl1 :: (a -> a -> a) -> Versioned a -> a #

toList :: Versioned a -> [a] #

null :: Versioned a -> Bool #

length :: Versioned a -> Int #

elem :: Eq a => a -> Versioned a -> Bool #

maximum :: Ord a => Versioned a -> a #

minimum :: Ord a => Versioned a -> a #

sum :: Num a => Versioned a -> a #

product :: Num a => Versioned a -> a #

Traversable Versioned Source # 
Instance details

Defined in HGeometry.YAML

Methods

traverse :: Applicative f => (a -> f b) -> Versioned a -> f (Versioned b) #

sequenceA :: Applicative f => Versioned (f a) -> f (Versioned a) #

mapM :: Monad m => (a -> m b) -> Versioned a -> m (Versioned b) #

sequence :: Monad m => Versioned (m a) -> m (Versioned a) #

FromYAML a => FromYAML (Versioned a) Source # 
Instance details

Defined in HGeometry.YAML

ToYAML a => ToYAML (Versioned a) Source # 
Instance details

Defined in HGeometry.YAML

Methods

toYAML :: Versioned a -> Node () Source #

Generic (Versioned a) Source # 
Instance details

Defined in HGeometry.YAML

Associated Types

type Rep (Versioned a) 
Instance details

Defined in HGeometry.YAML

type Rep (Versioned a) = D1 ('MetaData "Versioned" "HGeometry.YAML" "hgeometry-combinatorial-1.0.0.0-inplace" 'False) (C1 ('MetaCons "Versioned" 'PrefixI 'True) (S1 ('MetaSel ('Just "version") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version) :*: S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

Methods

from :: Versioned a -> Rep (Versioned a) x #

to :: Rep (Versioned a) x -> Versioned a #

Read a => Read (Versioned a) Source # 
Instance details

Defined in HGeometry.YAML

Show a => Show (Versioned a) Source # 
Instance details

Defined in HGeometry.YAML

Eq a => Eq (Versioned a) Source # 
Instance details

Defined in HGeometry.YAML

Methods

(==) :: Versioned a -> Versioned a -> Bool #

(/=) :: Versioned a -> Versioned a -> Bool #

type Rep (Versioned a) Source # 
Instance details

Defined in HGeometry.YAML

type Rep (Versioned a) = D1 ('MetaData "Versioned" "HGeometry.YAML" "hgeometry-combinatorial-1.0.0.0-inplace" 'False) (C1 ('MetaCons "Versioned" 'PrefixI 'True) (S1 ('MetaSel ('Just "version") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version) :*: S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

unversioned :: Versioned a -> a Source #

Unpack versioned data type.