FiniteCategories-0.1.0.0: test/ExampleSet/ExampleOrdSet.hs
{-| Module : FiniteCategories
Description : An example of set category.
Copyright : Guillaume Sabbagh 2021
License : GPL-3
Maintainer : guillaumesabbagh@protonmail.com
Stability : experimental
Portability : portable
An example of set category.
-}
module ExampleSet.ExampleOrdSet
(
set,
main
)
where
import Set.FinOrdSet (FinOrdSet(..))
import Data.Set (fromList)
import ExportGraphViz.ExportGraphViz (catToPdf,genToPdf)
-- | A category with {1,2} and {1,2,3} as objects and applications as morphisms.
set = FinOrdSet [fromList [1,2], fromList [1,2,3]] :: FinOrdSet Int
-- | Export the category @set@ as a pdf with GraphViz.
main = do
putStrLn "Start of ExampleOrdSet"
catToPdf set "OutputGraphViz/Examples/Set/ordSet"
genToPdf set "OutputGraphViz/Examples/Set/ordSetGen"
putStrLn "End of ExampleOrdSet"