packages feed

xcodec-1.1.0.0: xcodec.cabal

cabal-version:   3.0
version:         1.1.0.0
name:            xcodec
build-type:      Simple
author:          Zoey McBride
maintainer:      zoeymcbride@mailbox.org
license:         BSD-3-Clause
license-file:    LICENSE.txt
extra-doc-files: README.md, CHANGELOG.md
category:        Numeric, Data, Serialization
synopsis:        Classes for working with generically typed codecs.
description:
    This module provides a generic interface for working with binary codecs. It
    provides a type-class for manipulating bit data and instances for the
    bytestring package types (ByteString, ShortByteString, and LazyByteString).
    Another type-class is also provided for derivided type-class for importing
    modules to write generic encoders and decoders.
tested-with:
    GHC == 9.6.7

source-repository head {
    type:     git
    location: https://git.sr.ht/~z0/xcodec
}

-- | Sets flag for CI build toggle
flag CI {
    Description: CI Build options
    Default: False
    Manual: True
}

common HaskellConfig {
    hs-source-dirs: xcodec
    default-extensions: StrictData
    default-language: GHC2021
}

common Depends {
    build-depends:
        base >= 4.18 && < 5,
        array ^>= 0.5,
        bytestring >= 0.12 && < 0.13,
        containers >= 0.7 && < 8,
        text >=2.1 && < 2.2
}

common BuildUser {
    import: Depends
    ghc-options: -Wall -Wextra -Wno-unused-top-binds
}

common BuildCI {
    import: Depends
    ghc-options: -Wall -Wextra -Werror -Wno-unused-top-binds
}

library {
    import: HaskellConfig
    if flag(CI) { import: BuildCI }
    else { import: BuildUser }
    exposed-modules:
        -- * Type-class for transcoding binary data.
        Data.XCodec.BinaryTranscoder
        -- * Type-class for transcoding streams derivided from BinaryTranscoder
        Data.XCodec.StreamTranscoder
    other-modules:
        -- * Helper functions
        Data.XCodec.Internal
}