packages feed

debruijn-0.3.1: debruijn.cabal

cabal-version:   2.4
name:            debruijn
version:         0.3.1
license:         BSD-3-Clause
license-file:    LICENSE
category:        Development
synopsis:        de Bruijn indices and levels
description:
  de Bruijn indices and levels for well-scoped terms.
  .
  This is "unsafe" (as it uses 'unsafeCoerce') implementation, but it's fast.
  The API is the same as in @debruin-safe@ package.

author:          Oleg Grenrus <oleg.grenrus@iki.fi>
maintainer:      Oleg Grenrus <oleg.grenrus@iki.fi>
build-type:      Simple
tested-with:
  GHC ==9.2.8
   || ==9.4.8
   || ==9.6.7
   || ==9.8.4
   || ==9.10.2
   || ==9.12.2

extra-doc-files: CHANGELOG.md

source-repository head
  type:     git
  location: https://github.com/phadej/debruijn.git
  subdir:   debruijn

common lang
  default-language:   Haskell2010
  ghc-options:        -Wall -Wno-unticked-promoted-constructors
  default-extensions:
    BangPatterns
    DataKinds
    DeriveGeneric
    DeriveTraversable
    DerivingStrategies
    EmptyCase
    FlexibleInstances
    FunctionalDependencies
    GADTs
    OverloadedStrings
    PatternSynonyms
    QuantifiedConstraints
    RankNTypes
    RoleAnnotations
    ScopedTypeVariables
    StandaloneDeriving
    StandaloneKindSignatures
    TypeApplications
    TypeOperators
    ViewPatterns

library
  import:          lang
  hs-source-dirs:  src src-common

  -- GHC-boot libraries
  build-depends:
    , base          ^>=4.16.3.0 || ^>=4.17.0.0 || ^>=4.18.0.0 || ^>=4.19.0.0 || ^>=4.20.0.0 || ^>=4.21.0.0
    , deepseq       ^>=1.4.6.1  || ^>=1.5.0.0
    , transformers  ^>=0.5.6.2  || ^>=0.6.1.0

  -- rest of the dependencies
  build-depends:
    , fin        ^>=0.3.1
    , skew-list  ^>=0.1
    , some       ^>=1.0.6

  exposed-modules:
    DeBruijn
    DeBruijn.Add
    DeBruijn.Ctx
    DeBruijn.Env
    DeBruijn.Idx
    DeBruijn.Lte
    DeBruijn.Lvl
    DeBruijn.Ren
    DeBruijn.Size
    DeBruijn.Sub
    DeBruijn.Wk

  -- These modules are exported, but shouldn't be used directly.
  exposed-modules:
    DeBruijn.Internal.Add
    DeBruijn.Internal.Env
    DeBruijn.Internal.Idx
    DeBruijn.Internal.Lvl
    DeBruijn.Internal.Size

  other-modules:
    DeBruijn.RenExtras
    TrustworthyCompat

test-suite debruijn-tests
  import:         lang
  hs-source-dirs: tests
  type:           exitcode-stdio-1.0
  main-is:        debruijn-tests.hs
  build-depends:
    , base
    , debruijn

  build-depends:
    , QuickCheck        ^>=2.15.0.1
    , tasty             ^>=1.5.3
    , tasty-quickcheck  ^>=0.11.1