packages feed

mealy-0.5.0.1: mealy.cabal

cabal-version: 3.0
name: mealy
version: 0.5.0.1
license: BSD-3-Clause
license-file: LICENSE
copyright: Tony Day (c) 2013
category: algorithm
author: Tony Day
maintainer: tonyday567@gmail.com
homepage: https://github.com/tonyday567/mealy#readme
bug-reports: https://github.com/tonyday567/mealy/issues
synopsis: Mealy machines for processing time-series and ordered data.
description:
  @mealy@ reimagines statistics as a [mealy machine](https://en.wikipedia.org/wiki/Mealy_machine) processing data with some form of order such as time-series data. The 'Mealy', with the help of a decay function specifying the relative weights of recent values versus older value, can be treated as a compression or summary of the data stream into 'current state.'
  Mealies are highly polymorphic, situated at a busy crossroad of theory and practice, and lend themselves to ergonmic, compact and realistic representations of a wide range of online phenomena.

  == Usage

  >>> import Mealy

  >>> fold ((,) <$> ma 0.9 <*> std 0.9) [1..100]
  (91.00265621044142,9.472822805289121)

build-type: Simple
tested-with:
  ghc ==9.6.7
  ghc ==9.8.4
  ghc ==9.10.2
  ghc ==9.12.2

extra-doc-files:
  ChangeLog.md
  readme.org

source-repository head
  type: git
  location: https://github.com/tonyday567/mealy

common ghc-options-stanza
  ghc-options:
    -Wall
    -Wcompat
    -Widentities
    -Wincomplete-record-updates
    -Wincomplete-uni-patterns
    -Wpartial-fields
    -Wredundant-constraints

common ghc2024-additions
  default-extensions:
    DataKinds
    DerivingStrategies
    DisambiguateRecordFields
    ExplicitNamespaces
    GADTs
    LambdaCase
    MonoLocalBinds
    RoleAnnotations

common ghc2024-stanza
  if impl(ghc >=9.10)
    default-language:
      GHC2024
  else
    import: ghc2024-additions
    default-language:
      GHC2021

library
  import: ghc-options-stanza
  import: ghc2024-stanza
  hs-source-dirs: src
  build-depends:
    adjunctions >=4.0 && <4.5,
    base >=4.14 && <5,
    containers >=0.6 && <0.9,
    harpie >=0.1 && <0.2,
    harpie-numhask >=0.1 && <0.2,
    mwc-probability >=2.3.1 && <2.4,
    numhask >=0.11 && <0.14,
    primitive >=0.7.2 && <0.10,
    profunctors >=5.6.2 && <5.7,
    tdigest >=0.2.1 && <0.4,
    text >=1.2 && <2.2,
    vector >=0.12.3 && <0.14,
    vector-algorithms >=0.8.0 && <0.10,

  exposed-modules:
    Data.Mealy
    Data.Mealy.Quantiles
    Data.Mealy.Simulate

test-suite doctests
  import: ghc2024-stanza
  main-is: doctests.hs
  hs-source-dirs: test
  build-depends:
    base >=4.14 && <5,
    doctest-parallel >=0.3 && <0.5,
    mealy,

  ghc-options: -threaded
  type: exitcode-stdio-1.0

common ghc-options-exe-stanza
  ghc-options:
    -fforce-recomp
    -funbox-strict-fields
    -rtsopts
    -threaded
    -with-rtsopts=-N

executable mealy-perf
  import: ghc-options-exe-stanza
  import: ghc-options-stanza
  import: ghc2024-stanza
  main-is: mealy-perf.hs
  hs-source-dirs: test
  build-depends:
    base >=4.7 && <5,
    clock >=0.8 && <0.9,
    containers >=0.6 && <0.9,
    deepseq >=1.4.4 && <1.6,
    formatn >=0.2.1 && <0.4,
    harpie >=0.1 && <0.2,
    harpie-numhask >=0.1 && <0.2,
    mealy,
    mtl >=2.2.2 && <2.4,
    optics-core >=0.4 && <0.5,
    optparse-applicative >=0.17 && <0.20,
    perf >=0.14 && <0.15,
    tdigest >=0.2.1 && <0.4,
    text >=1.2 && <2.2,
    time >=1.10 && <1.15,

  ghc-options: -O2