cabal-version: 3.4
name: moonlight-category
version: 1.1.0.0
homepage: https://github.com/PaleRoses/moonlight
bug-reports: https://github.com/PaleRoses/moonlight/issues
synopsis: Categorical layer for Pale Meridian.
description:
A totalised, explicit-error category abstraction: limits and colimits, a
higher-category class tower, runtime-validated finite categories (@FinCat@),
site and path presentations, adhesive and PBPO rewriting witnesses, structured
cospans and double categories, an indexed typed-arrow layer, and a simplicial
sublibrary for Δ, finite simplicial sets, nerves, and Kan interfaces.
.
For general indexed category theory, prefer Sjoerd Visscher's @data-category@
package: its typed-arrow calculus is the primary inspiration for this package's
indexed modules, and several modules under "Moonlight.Category.Indexed" are adapted
from it. Thank you to Sjoerd Visscher for the design and implementation work in
@data-category@. See THIRD_PARTY_NOTICES.md.
license: MIT AND BSD-3-Clause
license-files:
LICENSE
THIRD_PARTY_NOTICES.md
copyright: (c) 2026 Blue Rose
author: Blue Rose
maintainer: rosaliafialkova@gmail.com
category: Math
build-type: Simple
tested-with: GHC == 9.10.3, GHC == 9.12.4, GHC == 9.14.1
extra-doc-files:
README.md
CHANGELOG.md
source-repository head
type: git
location: https://github.com/PaleRoses/moonlight.git
subdir: moonlight-category
source-repository this
type: git
location: https://github.com/PaleRoses/moonlight.git
tag: moonlight-category-1.1.0.0
subdir: moonlight-category
common shared-properties
default-language: GHC2024
ghc-options:
-Wall
-Wcompat
-Wincomplete-record-updates
-Wincomplete-uni-patterns
-Wredundant-constraints
-Wpartial-fields
-Wno-missing-import-lists
default-extensions:
TypeFamilies
UndecidableInstances
FunctionalDependencies
library abstract
import: shared-properties
visibility: public
hs-source-dirs: src-abstract
exposed-modules:
Moonlight.Category.Pure.CoveringFamily
Moonlight.Category.Pure.CoveringProduct
Moonlight.Category.Pure.Thin
Moonlight.Category.Pure.Category
Moonlight.Category.Pure.DecoratedPresentation
Moonlight.Category.Pure.Limits
Moonlight.Category.Pure.DecoratedComposition
Moonlight.Category.Pure.Adhesive
Moonlight.Category.Pure.StructuredCospan
Moonlight.Category.Pure.DoubleCategory
Moonlight.Category.Pure.PolynomialFunctor
Moonlight.Category.Pure.Higher
Moonlight.Category.Pure.Galois
Moonlight.Category.Pure.FiniteComposable
Moonlight.Category.Pure.Poset
Moonlight.Category.Pure.Unit
build-depends:
base >= 4.20 && < 5
, containers >= 0.6 && < 0.9
library finite
import: shared-properties
visibility: public
hs-source-dirs: src-finite
exposed-modules:
Moonlight.Category.Pure.FinCat
Moonlight.Category.Pure.FinCat.Functor
Moonlight.Category.Pure.FinPresentation
Moonlight.Category.Pure.Invertibility
Moonlight.Category.Pure.FinCat.Opposite
Moonlight.Category.Pure.Finite.DenseReachability
build-depends:
base >= 4.20 && < 5
, bytestring >= 0.11 && < 0.13
, containers >= 0.6 && < 0.9
, vector >= 0.13 && < 0.14
, moonlight-core >= 0.1.0.3 && < 0.2
, moonlight-category:abstract
library site
import: shared-properties
visibility: public
hs-source-dirs: src-site
exposed-modules:
Moonlight.Category.Pure.Site
Moonlight.Category.Pure.Site.Core
Moonlight.Category.Pure.Site.Graph
Moonlight.Category.Pure.Site.Manifest
Moonlight.Category.Pure.Site.Compile
Moonlight.Category.Pure.Site.Category
Moonlight.Category.Pure.Site.Quotient
build-depends:
base >= 4.20 && < 5
, containers >= 0.6 && < 0.9
, vector >= 0.13 && < 0.14
, moonlight-core >= 0.1.0.3 && < 0.2
, moonlight-category:abstract
, moonlight-category:finite
library indexed
import: shared-properties
visibility: public
hs-source-dirs: src-indexed
if impl(ghc >= 9.14)
ghc-options: -Wno-pattern-namespace-specifier
exposed-modules:
Moonlight.Category.Pure.Indexed.Category
Moonlight.Category.Pure.Indexed.Product
Moonlight.Category.Pure.Indexed.Functor
Moonlight.Category.Pure.Indexed.NaturalTransformation
Moonlight.Category.Pure.Indexed.Unit
Moonlight.Category.Pure.Indexed.Void
Moonlight.Category.Pure.Indexed.Coproduct
Moonlight.Category.Pure.Indexed.Adjunction
Moonlight.Category.Pure.Indexed.Limit
Moonlight.Category.Pure.Indexed.KanExtension
Moonlight.Category.Pure.Indexed.Simplex
build-depends:
base >= 4.20 && < 5
library simplicial
import: shared-properties
visibility: public
hs-source-dirs: src-simplicial
exposed-modules:
Moonlight.Category.Simplicial
Moonlight.Category.Pure.Simplicial.CategoricalSimplex
Moonlight.Category.Pure.Simplicial.TypeLevel
Moonlight.Category.Pure.Simplicial.Ordinal
Moonlight.Category.Pure.Simplicial.Delta
Moonlight.Category.Pure.Simplicial.Set
Moonlight.Category.Pure.Simplicial.Kan
Moonlight.Category.Pure.Simplicial.Validation
Moonlight.Category.Pure.Simplicial.Presheaf
Moonlight.Category.Pure.Simplicial.Spaces
Moonlight.Category.Pure.Simplicial.Homotopy
Moonlight.Category.Pure.Simplicial.Nerve
other-modules:
Moonlight.Category.Pure.Simplicial.Delta.Types
Moonlight.Category.Pure.Simplicial.Validation.Internal
Moonlight.Category.Pure.Simplicial.Set.Internal
build-depends:
algebraic-graphs >= 0.8 && < 0.9
, base >= 4.20 && < 5
, containers >= 0.6 && < 0.9
, moonlight-core >= 0.1.0.3 && < 0.2
, moonlight-category:abstract
, moonlight-category:finite
, moonlight-category:indexed
library
import: shared-properties
hs-source-dirs: src-public
exposed-modules:
Moonlight.Category
Moonlight.Category.Indexed
Moonlight.Category.Notation
Moonlight.Category.Presentation
build-depends:
base >= 4.20 && < 5
, moonlight-category:abstract
, moonlight-category:finite
, moonlight-category:site
, moonlight-category:indexed
library laws
import: shared-properties
visibility: public
hs-source-dirs: src-laws
exposed-modules:
Moonlight.Category.Effect.Fixture.FinCat
Moonlight.Category.Effect.Harness
Moonlight.Category.Effect.Harness.Adhesive
Moonlight.Category.Effect.Harness.Algebra
Moonlight.Category.Effect.Harness.Category
Moonlight.Category.Effect.Harness.Core
Moonlight.Category.Effect.Harness.Higher
Moonlight.Category.Effect.Harness.Limits
Moonlight.Category.Effect.Harness.Site
Moonlight.Category.Effect.LawNames
Moonlight.Category.Effect.Laws
Moonlight.Category.Effect.PathQuotientHarness
Moonlight.Category.Effect.SiteGen
other-modules:
Moonlight.Category.Effect.Laws.Adhesive
Moonlight.Category.Effect.Laws.Algebra
Moonlight.Category.Effect.Laws.Category
Moonlight.Category.Effect.Laws.Generators
Moonlight.Category.Effect.Laws.Higher
Moonlight.Category.Effect.Laws.Limits
Moonlight.Category.Effect.Laws.Site
Moonlight.Category.Effect.SitePathEnumeration
build-depends:
base >= 4.20 && < 5
, containers >= 0.6 && < 0.9
, tasty >= 1.4 && < 1.6
, tasty-quickcheck >= 0.10 && < 0.12
, hedgehog >= 1.2 && < 1.8
, moonlight-core >= 0.1.0.3 && < 0.2
, moonlight-pale:test-laws >= 0.1.0.1 && < 0.2
, moonlight-category:abstract
, moonlight-category:finite
, moonlight-category:site
common category-test-properties
import: shared-properties
build-depends:
base >= 4.20 && < 5
, tasty >= 1.4 && < 1.6
common category-abstract-fixture-slice
other-modules:
Moonlight.Category.Test.CoveringFixture
Moonlight.Category.Test.DoubleFixture
Moonlight.Category.Test.PolynomialFixture
build-depends:
moonlight-category:abstract
common category-abstract-test-slice
other-modules:
AbstractTests
AdhesiveSpec
CoveringProductSpec
DecoratedPresentationSpec
DoubleCategorySpec
FiniteComposableSpec
PolynomialFunctorWitnessSpec
build-depends:
moonlight-category
, moonlight-category:abstract
, moonlight-category:finite
, moonlight-category:laws
, moonlight-pale:test >= 0.1.0.2 && < 0.2
, tasty-hunit >= 0.10 && < 0.11
common category-finite-test-slice
other-modules:
DenseReachabilitySpec
FiniteTests
FinPresentationSpec
FinThinFunctorSpec
InvertibilitySpec
build-depends:
containers >= 0.6 && < 0.9
, moonlight-category
, moonlight-category:abstract
, moonlight-category:finite
, moonlight-category:laws
, moonlight-pale:test >= 0.1.0.2 && < 0.2
, tasty-hunit >= 0.10 && < 0.11
, tasty-quickcheck >= 0.10 && < 0.12
, QuickCheck >= 2.14 && < 2.19
, vector >= 0.13 && < 0.14
common category-site-test-slice
other-modules:
PathQuotientSpec
SiteSpec
SiteTests
build-depends:
containers >= 0.6 && < 0.9
, moonlight-category
, moonlight-category:laws
, moonlight-category:site
, tasty-hunit >= 0.10 && < 0.11
common category-indexed-test-slice
other-modules:
IndexedSpec
IndexedTests
SimplexSpec
build-depends:
moonlight-category
, moonlight-category:indexed
, tasty-hunit >= 0.10 && < 0.11
common category-simplex-test-fixture-slice
other-modules:
Moonlight.Category.Test.IndexedSimplexFixture
build-depends:
moonlight-category
common category-simplicial-test-slice
other-modules:
CategoricalSimplexSpec
DeltaSpec
HomotopySpec
KanSpec
Laws.Registry
Laws.Suite
NerveSpec
OrdinalSpec
PresheafSpec
SimplicialTests
SpacesSpec
build-depends:
containers >= 0.6 && < 0.9
, moonlight-category
, moonlight-category:indexed
, moonlight-category:laws
, moonlight-category:simplicial
, moonlight-pale:test-laws >= 0.1 && < 0.2
, tasty-hunit >= 0.10 && < 0.11
, tasty-quickcheck >= 0.10 && < 0.12
, QuickCheck >= 2.14 && < 2.19
common category-facade-test-slice
other-modules:
FacadeTests
FacadeSiteNerveSpec
NotationSpec
build-depends:
containers >= 0.6 && < 0.9
, moonlight-category
, moonlight-pale:test >= 0.1.0.2 && < 0.2
, moonlight-category:simplicial
, tasty-hunit >= 0.10 && < 0.11
common category-laws-test-slice
build-depends:
moonlight-category:laws
test-suite moonlight-category-abstract-test
import: category-test-properties, category-abstract-fixture-slice, category-abstract-test-slice
type: exitcode-stdio-1.0
hs-source-dirs:
test/abstract
test/support
main-is: Main.hs
test-suite moonlight-category-finite-test
import: category-test-properties, category-finite-test-slice
type: exitcode-stdio-1.0
hs-source-dirs: test/finite
main-is: Main.hs
test-suite moonlight-category-site-test
import: category-test-properties, category-site-test-slice
type: exitcode-stdio-1.0
hs-source-dirs: test/site
main-is: Main.hs
test-suite moonlight-category-indexed-test
import: category-test-properties, category-indexed-test-slice, category-simplex-test-fixture-slice
type: exitcode-stdio-1.0
hs-source-dirs:
test/indexed
test/support
main-is: Main.hs
test-suite moonlight-category-simplicial-test
import: category-test-properties, category-simplex-test-fixture-slice, category-simplicial-test-slice
type: exitcode-stdio-1.0
hs-source-dirs:
test/simplicial
test/support
main-is: Main.hs
test-suite moonlight-category-facade-test
import: category-test-properties, category-facade-test-slice
type: exitcode-stdio-1.0
hs-source-dirs: test/facade
main-is: Main.hs
test-suite moonlight-category-laws-test
import: category-test-properties, category-laws-test-slice
type: exitcode-stdio-1.0
hs-source-dirs: test/laws
main-is: Main.hs
-- The focused suites own behavior. This component owns only the union of their
-- module, instance, and dependency surfaces, compiled at the shared test O0.
test-suite moonlight-category-coherence-test
import: category-test-properties, category-abstract-fixture-slice, category-abstract-test-slice, category-finite-test-slice, category-site-test-slice, category-indexed-test-slice, category-simplex-test-fixture-slice, category-simplicial-test-slice, category-facade-test-slice, category-laws-test-slice
type: exitcode-stdio-1.0
hs-source-dirs:
test/coherence
test/abstract
test/finite
test/site
test/indexed
test/simplicial
test/facade
test/support
main-is: Main.hs
common category-benchmark-properties
import: shared-properties
ghc-options: -O2 -rtsopts
build-depends:
base >= 4.20 && < 5
, tasty-bench >= 0.3 && < 0.6
common category-benchmark-support-slice
other-modules:
BenchSupport
common category-abstract-benchmark-slice
other-modules:
AbstractBench
AbstractFixtures
Adhesive.Graph
Adhesive.Subset
Adhesive.Suite
Adhesive.Symbolic
Algebraic.Decorated
Algebraic.Double
Algebraic.Galois
Algebraic.Polynomial
Algebraic.StructuredCospan
Algebraic.Suite
Covering
build-depends:
containers >= 0.6 && < 0.9
, deepseq >= 1.4 && < 1.6
, moonlight-category:abstract
, vector >= 0.13 && < 0.14
common category-fincat-benchmark-slice
other-modules:
FinCat
build-depends:
containers >= 0.6 && < 0.9
, deepseq >= 1.4 && < 1.6
, moonlight-category
, moonlight-category:abstract
, moonlight-category:finite
, moonlight-category:laws
common category-finite-benchmark-slice
other-modules:
FiniteBench
Invertibility
common category-site-benchmark-slice
other-modules:
SiteBench
SiteCases
SiteManifest
SitePathQuotient
build-depends:
moonlight-category:site
common category-indexed-benchmark-slice
other-modules:
IndexedBench
Simplex
build-depends:
moonlight-category:indexed
common category-simplicial-benchmark-slice
other-modules:
SimplicialBench
SimplicialDelta
SimplicialNerve
SimplicialSpaces
SimplicialWeight
build-depends:
containers >= 0.6 && < 0.9
, deepseq >= 1.4 && < 1.6
, moonlight-category
, moonlight-category:simplicial
benchmark moonlight-category-abstract-bench
import: category-benchmark-properties, category-benchmark-support-slice, category-abstract-fixture-slice, category-abstract-benchmark-slice
type: exitcode-stdio-1.0
hs-source-dirs:
bench/abstract
bench/support
test/support
main-is: Main.hs
benchmark moonlight-category-finite-bench
import: category-benchmark-properties, category-benchmark-support-slice, category-fincat-benchmark-slice, category-finite-benchmark-slice
type: exitcode-stdio-1.0
hs-source-dirs:
bench/finite
bench/support
main-is: Main.hs
benchmark moonlight-category-site-bench
import: category-benchmark-properties, category-benchmark-support-slice, category-fincat-benchmark-slice, category-site-benchmark-slice
type: exitcode-stdio-1.0
hs-source-dirs:
bench/site
bench/finite
bench/support
main-is: Main.hs
benchmark moonlight-category-indexed-bench
import: category-benchmark-properties, category-benchmark-support-slice, category-indexed-benchmark-slice
type: exitcode-stdio-1.0
hs-source-dirs:
bench/indexed
bench/support
main-is: Main.hs
benchmark moonlight-category-simplicial-bench
import: category-benchmark-properties, category-simplicial-benchmark-slice
type: exitcode-stdio-1.0
hs-source-dirs: bench/simplicial
main-is: Main.hs
benchmark moonlight-category-bench
import: category-benchmark-properties, category-benchmark-support-slice, category-abstract-fixture-slice, category-abstract-benchmark-slice, category-fincat-benchmark-slice, category-finite-benchmark-slice, category-site-benchmark-slice, category-indexed-benchmark-slice, category-simplicial-benchmark-slice
type: exitcode-stdio-1.0
hs-source-dirs:
bench/aggregate
bench/abstract
bench/finite
bench/site
bench/indexed
bench/simplicial
bench/support
test/support
main-is: Main.hs