FiniteCategories-0.1.0.0: Finite categories and usual categorical constructions on them.
CopyrightGuillaume Sabbagh 2021
LicenseGPL-3
Maintainerguillaumesabbagh@protonmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

IO.Parsers.SafeCompositionGraphFunctor

Description

A parser to read .fscg files.

A .fscg file follows the following rules : 1. There is a line "SRC" and a line "/SRC". 1.1 Between these two lines, the source safe composition graph is defined as in a scg file. 2. There is a line "TGT" and a line "/TGT". 2.1 Between these two lines, the target safe composition graph is defined as in a scg file. 3. Outside of the two previously described sections, you can declare the maps between objects and morphisms. 3.1 You map an object to another with the following syntax : "object1 => object2". 3.2 You map a morphism to another with the following syntax : "objSrc1 -arrowSrc1-> objSrc2 => objTgt1 -arrowTgt1-> objTgt2". 4. You don't have to (and you shouldn't) specify maps from identities, nor maps from composite arrows.

Synopsis

Documentation

readFSCGFile :: String -> IO SCGD Source #

Reads a fscg file and returns a diagram.