{-| Module  : FiniteCategories
Description : Tests the parsing of scg files.
Copyright   : Guillaume Sabbagh 2021
License     : GPL-3
Maintainer  : guillaumesabbagh@protonmail.com
Stability   : experimental
Portability : portable

Tests the parsing of scg files.
-}
module ExampleParsers.ExampleSafeCompositionGraph
(
    main
)
where
    import              IO.Parsers.Lexer
    import              IO.Parsers.SafeCompositionGraph
    import              CompositionGraph.SafeCompositionGraph
    import              ExportGraphViz.ExportGraphViz

    -- | Tests the parsing of scg files.
    main = do 
        putStrLn "Start of ExampleParsers.ExampleSafeCompositionGraph"
        cg <- readSCGFile "test/ExampleParsers/Example.scg"
        catToPdf cg "OutputGraphViz/Examples/Parsers/safeCompositionGraph"
        writeSCGFile cg "test/ExampleParsers/Example2.scg"
        cg2 <- readSCGFile "test/ExampleParsers/Example2.scg"
        catToPdf cg2 "OutputGraphViz/Examples/Parsers/safeCompositionGraph2"
        putStrLn "End of ExampleParsers.ExampleSafeCompositionGraph"