Copyright | Guillaume Sabbagh 2021 |
---|---|
License | GPL-3 |
Maintainer | guillaumesabbagh@protonmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- type SCG = SafeCompositionGraph Text Text
- parseSCGString :: String -> SCG
- readSCGFile :: String -> IO SCG
- writeSCGFile :: (PrettyPrintable a, PrettyPrintable b, Eq a, Eq b) => SafeCompositionGraph a b -> String -> IO ()
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.