packages feed

wireform-derive-0.2.0.0: wireform-derive.cabal

cabal-version: 3.0
name: wireform-derive
version: 0.2.0.0
synopsis: Annotation-driven Template Haskell deriver core for wireform
description:
  Shared @Modifier@ annotation vocabulary and Template Haskell
  reflection machinery used by per-format @wireform-*@ deriver
  packages (@wireform-proto@, @wireform-cbor@, @wireform-msgpack@,
  @wireform-thrift@, @wireform-avro@, @wireform-bson@, …).
  .
  A single @{-\# ANN ... \#-}@ pragma on a Haskell record drives
  instance generation for every wire format the user opts into.
  The vocabulary lives in @Wireform.Derive.Modifier@:
  .
  * @rename@, @renameStyle@, @renameWith@, @renameIdiomatic@ --
    wire-key text overrides.
  * @tag N@ -- explicit field number / Thrift field ID / Bond ID /
    Iceberg field ID.
  * @skip@, @defaults@, @required@, @optional@, @coerced@,
    @flatten@, @wireOverride@ -- standard knobs.
  * @forBackend@ / @forBackends@ / @disableFor@ -- per-backend
    overrides that shadow globals without conflicting.
  * @mapKey@, @oneof@ -- format-specific shape hints.
  * @extension@ -- typed per-backend payloads via the
    @BackendModifier@ typeclass.
  .
  See the umbrella @wireform@ package for the full multi-format
  story.  Inspired by riz0id's @serde-th@ and Aeson's @aeson-th@.

homepage: https://github.com/iand675/wireform-
bug-reports: https://github.com/iand675/wireform-/issues
license: BSD-3-Clause
license-file: LICENSE
author: Ian Duncan
maintainer: ian@iankduncan.com
copyright: 2026 Ian Duncan
category: Data, Codec, Serialization
build-type: Simple
tested-with: GHC == 9.6.4, GHC == 9.8.4
extra-doc-files:
  CHANGELOG.md
  README.md

source-repository head
  type:     git
  location: https://github.com/iand675/wireform-

common defaults
  ghc-options:
    -Wall
    -Wcompat
    -Widentities
    -Wincomplete-record-updates
    -Wincomplete-uni-patterns
    -Wpartial-fields
    -Wredundant-constraints
    -O2
  default-language: GHC2021
  default-extensions:
    StrictData
    DerivingStrategies
    DeriveGeneric
    DeriveAnyClass
    DeriveDataTypeable
    DeriveLift
    OverloadedStrings
    LambdaCase
    ScopedTypeVariables
    TupleSections
    MultiWayIf
    RecordWildCards
    NamedFieldPuns

library
  import: defaults
  hs-source-dirs: src
  exposed-modules:
    Wireform.Derive
    Wireform.Derive.Backend
    Wireform.Derive.NameStyle
    Wireform.Derive.Modifier
    Wireform.Derive.TypeInfo
    Wireform.Derive.ModifierInfo
    Wireform.Derive.Extension
    Wireform.Derive.Aeson
  build-depends:
    base >= 4.16 && < 5,
    bytestring >= 0.11 && < 0.13,
    containers >= 0.6 && < 0.9,
    text >= 2.0 && < 2.2,
    template-haskell >= 2.18 && < 2.25,
    th-abstraction >= 0.5 && < 0.8,
    mtl >= 2.2 && < 2.4,
    transformers >= 0.5 && < 0.7,
    deepseq >= 1.4 && < 1.6,
    hashable >= 1.3 && < 1.6,
    aeson >= 2.1 && < 2.3

test-suite wireform-derive-test
  import: defaults
  type: exitcode-stdio-1.0
  main-is: Main.hs
  hs-source-dirs: test
  other-modules:
    Test.Derive.NameStyle
    Test.Derive.Modifier
    Test.Derive.Extension
    Test.Derive.Fixtures
    Test.Derive.Fixtures.Types
    Test.Derive.Fixtures.Reified
    Test.Derive.Aeson
    Test.Derive.Aeson.Types
    Test.Derive.Aeson.Instances
  build-depends:
    base,
    wireform-derive,
    bytestring,
    containers,
    text,
    aeson,
    template-haskell,
    hedgehog >= 1.0 && < 1.8,
    sydtest,
    sydtest-hedgehog