packages feed

polytropos-generics-0.1.0.2: polytropos-generics.cabal

cabal-version: 3.0
name: polytropos-generics
version: 0.1.0.2
synopsis: Structural datatype generics, representation bridging, and whole-data traversal
description:
  Generic deriving, representation bridging, and structural traversal engine for <https://hackage.haskell.org/package/polytropos polytropos>.

  This package bridges nominal Haskell algebraic data types (ADTs) to and from the
  unified flat representation 'Polytropos.Core.Rep', and provides zero-overhead structural operations
  ('Polytropos.Generics.geq', 'Polytropos.Generics.gcompare', 'Polytropos.Generics.gshowsPrec',
  'Polytropos.Generics.gmap', 'Polytropos.Generics.gfoldMap') across open rows ('Polytropos.Record', 'Polytropos.Variant')
  and nominal types.

  Unlike <https://hackage.haskell.org/package/large-generics large-generics> (which is strictly record-only and models 1D SOP products),
  @polytropos-generics@ unifies sums and products into one tagged representation backed
  by a 2D dictionary matrix (@SmallArray (SmallArray (DictAny c))@) for O(1) constructor dispatch.
  Unlike standard "GHC.Generics", it executes as tight unrolled loops over flat contiguous
  memory rather than traversing nested binary trees.

  Start at the front door module "Polytropos.Generics" for architectural rationales,
  usage guidance, and worked examples for both open rows and nominal ADTs.
license: EUPL-1.2 OR Apache-2.0
license-file: LICENSE
author: Nadia Yvette Chambers
maintainer: nadia.yvette.chambers@ik.me
category: Generics, Data
homepage: https://github.com/NadiaYvette/polytropos
bug-reports: https://github.com/NadiaYvette/polytropos/issues
extra-doc-files:
    README.md
  , CHANGELOG.md
build-type: Simple

source-repository head
  type:     git
  location: https://github.com/NadiaYvette/polytropos
  subdir:   packages/polytropos-generics

library
  exposed-modules:
    Polytropos.Generics
  build-depends:
    base >= 4.14 && < 5,
    polytropos-core >= 0.1 && < 0.2,
    primitive >= 0.7 && < 0.10
  hs-source-dirs: src
  default-language: GHC2021
  ghc-options: -Wall

test-suite polytropos-generics-test
  type: exitcode-stdio-1.0
  main-is: Main.hs
  build-depends:
    base,
    polytropos-core,
    polytropos-generics,
    polytropos-plugin,
    primitive,
    tasty,
    tasty-hunit
  hs-source-dirs: test
  default-language: GHC2021
  ghc-options: -Wall -fplugin=Polytropos.Plugin