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.SafeCompositionGraph

Description

A parser to read .scg files.

A .scg file follows the following rules : 1. The first line is an integer specifying the max number of loops morphisms can do. 2. The rest of the file is a cg file. (See IO.Parsers.CompositionGraph)

Synopsis

Documentation

type SCG = SafeCompositionGraph Text Text Source #

The type of SafeCompositionGraph created by reading a scg file.

parseSCGString :: String -> SCG Source #

Parse a string extracted from a scg file. Returns a safe composition graph.

readSCGFile :: String -> IO SCG Source #

Reads a scg file and returns a safe composition graph.

writeSCGFile :: (PrettyPrintable a, PrettyPrintable b, Eq a, Eq b) => SafeCompositionGraph a b -> String -> IO () Source #

Saves a safe composition graph into a file located at a given path.