packages feed

mealy-0.4.3: mealy.cabal

cabal-version: 3.0
name:          mealy
version:       0.4.3
license:       BSD-3-Clause
copyright:     Tony Day (c) 2013 - 2022
maintainer:    tonyday567@gmail.com
author:        Tony Day
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@ provides support for computing statistics (such as an average or a standard deviation)
  as current state. Usage is to supply a decay function representing the relative weights of recent values versus older ones, in the manner of exponentially-weighted averages. The library attempts to be polymorphic in the statistic which can be combined in applicative style.

  == Usage

  >>> import Mealy

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

category:      folding
build-type:    Simple
tested-with:   GHC == 8.10.7 || ==9.2.8 || ==9.4.5 || ==9.6.2

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

common ghc2021-stanza
  if impl(ghc >=9.2)
    default-language:
      GHC2021
  if impl(ghc <9.2)
    default-language:
      Haskell2010
    default-extensions:
      BangPatterns
      BinaryLiterals
      ConstrainedClassMethods
      ConstraintKinds
      DeriveDataTypeable
      DeriveFoldable
      DeriveFunctor
      DeriveGeneric
      DeriveLift
      DeriveTraversable
      DoAndIfThenElse
      EmptyCase
      EmptyDataDecls
      EmptyDataDeriving
      ExistentialQuantification
      ExplicitForAll
      FlexibleContexts
      FlexibleInstances
      ForeignFunctionInterface
      GADTSyntax
      GeneralisedNewtypeDeriving
      HexFloatLiterals
      ImplicitPrelude
      InstanceSigs
      KindSignatures
      MonomorphismRestriction
      MultiParamTypeClasses
      NamedFieldPuns
      NamedWildCards
      NumericUnderscores
      PatternGuards
      PolyKinds
      PostfixOperators
      RankNTypes
      RelaxedPolyRec
      ScopedTypeVariables
      StandaloneDeriving
      StarIsType
      TraditionalRecordSyntax
      TupleSections
      TypeApplications
      TypeOperators
      TypeSynonymInstances
  if impl(ghc <9.2) && impl(ghc >=8.10)
    default-extensions:
      ImportQualifiedPost
      StandaloneKindSignatures

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

library
  import: ghc2021-stanza
  import: ghc-options-stanza
  exposed-modules:
    Data.Mealy
    Data.Mealy.Quantiles
    Data.Mealy.Simulate

  hs-source-dirs:   src
  build-depends:
    , adjunctions        ^>=4.4
    , base               >=4.12   && <5
    , containers         ^>=0.6.2
    , mwc-probability    ^>=2.3.1
    , numhask            >=0.10 && <0.12
    , numhask-array      >=0.10.1 && <0.12
    , primitive          >=0.7.2   && <0.9
    , profunctors        ^>=5.6.2
    , tdigest            >=0.2.1 && <4
    , text               >=1.2.4   && <2.1
    , vector             >=0.12.3  && <0.14
    , vector-algorithms  >=0.8.0   && <0.10