packages feed

FiniteCategories-0.1.0.0: FiniteCategories.cabal

cabal-version:      3.0

-- Initial package description 'FiniteCategories.cabal' generated by
-- 'cabal init'. For further documentation, see:
--   http://haskell.org/cabal/users-guide/
-- 
-- The name of the package.
name:               FiniteCategories

-- The package version.
-- See the Haskell package versioning policy (PVP) for standards
-- guiding when and how versions should be incremented.
-- https://pvp.haskell.org
-- PVP summary:      +-+------- breaking API changes
--                   | | +----- non-breaking API additions
--                   | | | +--- code changes with no API change
version:            0.1.0.0

-- A short (one-line) description of the package.
synopsis: Finite categories and usual categorical constructions on them.
    

-- A longer description of the package.
description: This package provides tools to create categories at the value level. This is different from the __Hask__ category where types are objects in a category with infinite objects and arrows, here we construct categories where objects and arrows are arbitrary values so that we can change categories during runtime. Each category implements three functions following the category structure axioms : @ob@ which returns objects of the category, @ar@ which returns arrows between two objects of the category and @identity@ which returns the identity of an object. Thanks to theses functions, we can construct automatically all the usual constructions on the categories (limits and colimits, adjunctions, Yoneda embedding, etc.) Functors are different from usual @Functor@ typeclass, we store functors as mapping between objects and morphisms of two categories. This package is also different from the package @data-category@ because we can enumerate objects and arrows in a category.  This allows us to construct limit, colimits, adjunctions, etc. automatically for arbitrary finite categories. On the other hand, we loose typecheck at compilation time which ensures that composition is sound in __Hask__, composition in our package might lead to an error raised during runtime. See the Readme file for installation help.

-- URL for the project homepage or repository.
homepage: https://gitlab.utc.fr/gsabbagh/FiniteCategories

-- A URL where users can report bugs.
-- bug-reports: 

-- The license under which the package is released.
license:            GPL-3.0-or-later

-- The file containing the license text.
license-file:       LICENSE

-- The package author(s).
author:             Guillaume Sabbagh

-- An email address to which users can send suggestions, bug reports, and patches.
maintainer:         guillaumesabbagh@protonmail.com

-- A copyright notice.
-- copyright:
category:           Data, Maths

-- Extra files to be distributed with the package, such as examples or a README.
extra-source-files:
    CHANGELOG.md
    Readme.md
    test/ExampleAdjunction/ExampleAdjunction.scg
    test/ExampleAdjunction/ExampleAdjunctionDiag1.fscg
    test/ExampleAdjunction/ExampleAdjunctionDiag2.fscg
    test/ExampleParsers/Example.fscg
    test/ExampleParsers/Example.scg
    test/ExampleParsers/Example2.scg

library
    -- Modules exported by the library.
    exposed-modules:    CompositionGraph.CompositionGraph, 
                        CompositionGraph.SafeCompositionGraph,
                        ExportGraphViz.ExportGraphViz,
                        FiniteCategory.FiniteCategory,
                        RandomCompositionGraph.RandomCompositionGraph,
                        Set.FinOrdSet,
                        Utils.CartesianProduct,
                        IO.CreateAndWriteFile,
                        Utils.Sample,
                        Utils.Tuple,
                        Cat.FinCat,
                        Utils.EnumerateMaps,
                        Diagram.Diagram,
                        UsualCategories.DiscreteCategory,
                        UsualCategories.One,
                        UsualCategories.Two,
                        UsualCategories.Three,
                        UsualCategories.Zero,
                        UsualCategories.Parallel,
                        CommaCategory.CommaCategory,
                        FunctorCategory.FunctorCategory,
                        DiagonalFunctor.DiagonalFunctor,
                        ConeCategory.ConeCategory,
                        RandomDiagram.RandomDiagram,
                        IO.PrettyPrint,
                        IO.Show,
                        Utils.AssociationList,
                        Cat.PartialFinCat,
                        Utils.SetList,
                        Config.Config,
                        Diagram.Conversion,
                        Subcategories.FreeSubcategory,
                        IO.Parsers.Lexer,
                        IO.Parsers.CompositionGraph,
                        IO.Parsers.SafeCompositionGraph,
                        IO.Parsers.SafeCompositionGraphFunctor,
                        ConeCategory.LeftCone,
                        OppositeCategory.OppositeCategory,
                        Set.FinSet,
                        YonedaEmbedding.YonedaEmbedding,
                        Subcategories.Subcategory,
                        Subcategories.FullSubcategory,
                        UsualCategories.V,
                        UsualCategories.Hat,
                        ProductCategory.ProductCategory,
                        Currying.Currying,
                        UsualCategories.Square,
                        Adjunction.Adjunction,
                        Limit.Limit

    -- Modules included in this library but not exported.
    -- other-modules:  

    -- LANGUAGE extensions used by modules in this package.
    other-extensions: MultiParamTypeClasses, FunctionalDependencies, UndecidableInstances, FlexibleInstances

    -- Other library packages from which modules are imported.
    build-depends:      base             >=4.15.0.0 && < 4.16,
                        containers       >= 0.6.4 && < 0.7,
                        directory        >= 1.3.6 && < 1.4,
                        filepath         >= 1.4.2 && < 1.5,
                        fgl              >= 5.7.0 && < 5.8,
                        graphviz         >= 2999.20.1 && < 2999.21,
                        text             >= 1.2.4 && < 1.3,
                        process          >= 1.6.11 && < 1.7,
                        random           >= 1.2.1 && < 1.3,

    -- Directories containing source files.
    hs-source-dirs:   src

    -- Base language which the package is written in.
    default-language: Haskell2010

test-suite FiniteCategories-test
    -- Base language which the package is written in.
    default-language: Haskell2010

    -- The interface type and version of the test suite.
    type:             exitcode-stdio-1.0

    -- Directories containing source files.
    hs-source-dirs:   test

    -- The entrypoint to the test suite.
    main-is:          RunAllExamples.hs

    -- Test dependencies.
    build-depends:      FiniteCategories,
                        base             >=4.15.0.0 && < 4.16,
                        containers       >= 0.6.4 && < 0.7,
                        directory        >= 1.3.6 && < 1.4,
                        filepath         >= 1.4.2 && < 1.5,
                        fgl              >= 5.7.0 && < 5.8,
                        graphviz         >= 2999.20.1 && < 2999.21,
                        text             >= 1.2.4 && < 1.3,
                        process          >= 1.6.11 && < 1.7,
                        random           >= 1.2.1 && < 1.3,

    other-modules:  ExampleAdjunction.ExampleAdjunction
                    ExampleCat.ExampleCat
                    ExampleCat.ExampleFunctor
                    ExampleCat.ExamplePartialFinCat
                    ExampleCommaCategory.ExampleArrowCategory
                    ExampleCommaCategory.ExampleCosliceCategory
                    ExampleCommaCategory.ExampleSliceCategory
                    ExampleCompositionGraph.ExampleCompositionGraph
                    ExampleCompositionGraph.ExampleCompositionGraphConstruction
                    ExampleCompositionGraph.ExampleFinSetToCompositionGraph
                    ExampleCompositionGraph.ExampleSafeCompositionGraph
                    ExampleConeCategory.ExampleCoconeCategory
                    ExampleConeCategory.ExampleColimit
                    ExampleConeCategory.ExampleConeCategory
                    ExampleConeCategory.ExampleLeftCone
                    ExampleConeCategory.ExampleLimit
                    ExampleCurrying.ExampleCurrying
                    ExampleDiagonalFunctor.ExampleDiagonalFunctor
                    ExampleDiagram.ExampleConstantDiagram
                    ExampleDiagram.ExampleConversion
                    ExampleDiagram.ExampleDiagram
                    ExampleDiagram.ExampleDiscreteDiagram
                    ExampleDiagram.ExampleIdentityDiagram
                    ExampleDiagram.ExampleParallelDiagram
                    ExampleDiagram.ExampleSelectOneDiagram
                    ExampleDiagram.ExampleSelectThreeDiagram
                    ExampleDiagram.ExampleSelectTwoDiagram
                    ExampleDiagram.ExampleSelectZeroDiagram
                    ExampleFunctorCategory.ExampleFunctorCategory
                    ExampleOppositeCategory.ExampleOppositeCategory
                    ExampleParsers.ExampleSafeCompositionGraph
                    ExampleParsers.ExampleSafeCompositionGraphFunctor
                    ExampleProductCategory.ExampleProductCategory
                    ExampleRandomCompositionGraph.ExampleRandomCompositionGraph
                    ExampleRandomDiagram.ExampleRandomDiagram
                    ExampleRandomDiagram.ExampleRandomTriangle
                    ExampleSet.ExampleCompletion
                    ExampleSet.ExampleOrdSet
                    ExampleSet.ExamplePowerOrdSet
                    ExampleSet.ExamplePowerSet
                    ExampleSet.ExampleSet
                    ExampleSubcategories.ExampleFreeSubcategory
                    ExampleYonedaEmbedding.ExampleYonedaEmbedding