packages feed

hanalyze-0.1.0.0: hanalyze.cabal

cabal-version: 3.0
name:          hanalyze
version:       0.1.0.0
synopsis:      A general-purpose statistical analysis, optimization and visualization toolkit
description:
    @hanalyze@ is a self-contained Haskell toolkit for classical regression
    (LM, GLM, GLMM, splines, kernels, GP, RFF), Bayesian modeling
    (HBM DSL with MH, HMC, NUTS, Gibbs, ADVI), design of experiments
    (full/fractional factorial, RSM, D-optimal, orthogonal arrays, Taguchi),
    optimization (Nelder-Mead, L-BFGS, DE, CMA-ES, NSGA-II, Bayesian
    optimization, augmented Lagrangian), and Vega-Lite-based visualization
    with HTML / PNG / SVG output.
    .
    All algorithms are implemented natively in Haskell — no R / Stan / Python
    bridges. Data interchange uses the @dataframe@ package as a first-class
    citizen.
    .
    A unified @hanalyze@ command-line interface exposes the most common
    workflows (@regress@, @info@, @hist@, @doe@, @taguchi@, @ridge@,
    @kernel@, @spline@, @multireg@, @clean@, @melt@, @regrid@, ...).
homepage:      https://github.com/frenzieddoll/hanalyze
bug-reports:   https://github.com/frenzieddoll/hanalyze/issues
license:       BSD-3-Clause
license-file:  LICENSE
author:        Toshiaki Honda
maintainer:    frenzieddoll@gmail.com
copyright:     2026 Toshiaki Honda
category:      Math, Statistics, Numeric, Machine Learning
build-type:    Simple
tested-with:   GHC == 9.6.7
extra-doc-files:
    README.md
    CHANGELOG.md

extra-source-files:
    data/dirty/*.csv
    data/distributions/*.csv
    data/io/*.csv
    data/readme/*.csv
    data/regression/*.csv

source-repository head
  type:     git
  location: https://github.com/frenzieddoll/hanalyze.git

common warnings
  ghc-options: -Wall -Wcompat -Widentities -Wredundant-constraints

common opt
  ghc-options: -O2 -funbox-strict-fields

library
  import:           warnings, opt
  hs-source-dirs:   src
  default-language: GHC2021
  exposed-modules:
    Hanalyze.DataIO.CSV
    Hanalyze.DataIO.Preprocess
    Hanalyze.DataIO.External
    Hanalyze.DataIO.Convert
    Hanalyze.DataIO.Log
    Hanalyze.DataIO.Health
    Hanalyze.DataIO.Sniff
    Hanalyze.DataIO.Clean
    Hanalyze.DataIO.Reshape
    Hanalyze.Viz.Core
    Hanalyze.Viz.PlotConfig
    Hanalyze.Viz.PlotData
    Hanalyze.Viz.PlotData.DataFrame
    Hanalyze.Viz.Scatter
    Hanalyze.Viz.Histogram
    Hanalyze.Viz.Bar
    Hanalyze.Model.Core
    Hanalyze.Model.LM
    Hanalyze.Model.LM.Diagnostics
    Hanalyze.Model.GLM
    Hanalyze.Model.GLMM
    Hanalyze.Model.Spline
    Hanalyze.Model.Kernel
    Hanalyze.Model.Regularized
    Hanalyze.Model.RFF
    Hanalyze.Model.GPRobust
    Hanalyze.Model.Quantile
    Hanalyze.Model.GAM
    Hanalyze.Model.RandomForest
    Hanalyze.Model.MultiLM
    Hanalyze.Model.Multivariate
    Hanalyze.Model.MultiGP
    Hanalyze.Model.MultiOutput
    Hanalyze.Model.PCA
    Hanalyze.Model.Cluster
    Hanalyze.Model.DecisionTree
    Hanalyze.Model.TimeSeries
    Hanalyze.Model.Survival
    Hanalyze.Design.Factorial
    Hanalyze.Design.Block
    Hanalyze.Design.Mixed
    Hanalyze.Design.Anova
    Hanalyze.Design.Power
    Hanalyze.Design.Quality
    Hanalyze.Design.RSM
    Hanalyze.Design.Optimal
    Hanalyze.Design.MultiRSM
    Hanalyze.Design.Orthogonal
    Hanalyze.Design.Taguchi
    Hanalyze.Optim.Desirability
    Hanalyze.Model.HBM
    Hanalyze.MCMC.Core
    Hanalyze.MCMC.MH
    Hanalyze.MCMC.HMC
    Hanalyze.MCMC.NUTS
    Hanalyze.MCMC.Gibbs
    Hanalyze.MCMC.Slice
    Hanalyze.Stat.Distribution
    Hanalyze.Stat.Standardize
    Hanalyze.Stat.NumberFormat
    Hanalyze.Stat.MCMC
    Hanalyze.Stat.ModelSelect
    Hanalyze.Stat.AD
    Hanalyze.Stat.VI
    Hanalyze.Stat.PosteriorPredictive
    Hanalyze.Stat.Summary
    Hanalyze.Stat.Interpolate
    Hanalyze.Stat.AdaptiveGrid
    Hanalyze.Stat.KernelDist
    Hanalyze.Stat.Cholesky
    Hanalyze.Stat.QuasiRandom
    Hanalyze.Stat.Test
    Hanalyze.Stat.ClassMetrics
    Hanalyze.Stat.CV
    Hanalyze.Stat.MultipleTesting
    Hanalyze.Stat.Bootstrap
    Hanalyze.Stat.Effect
    Hanalyze.Stat.Interpret
    Hanalyze.Optim.Adam
    Hanalyze.Optim.GradAscent
    Hanalyze.Optim.Numeric
    Hanalyze.Optim.Common
    Hanalyze.Optim.NelderMead
    Hanalyze.Optim.LBFGS
    Hanalyze.Optim.LineSearch
    Hanalyze.Optim.DifferentialEvolution
    Hanalyze.Optim.CMAES
    Hanalyze.Optim.CMAESFull
    Hanalyze.Optim.SimulatedAnnealing
    Hanalyze.Optim.ParticleSwarm
    Hanalyze.Optim.Constrained
    Hanalyze.Optim.NSGA
    Hanalyze.Optim.Pareto
    Hanalyze.Optim.Acquisition
    Hanalyze.Optim.BayesOpt
    Hanalyze.Viz.MCMC
    Hanalyze.Viz.ModelGraph
    Hanalyze.Viz.Report
    Hanalyze.Model.GP
    Hanalyze.Viz.GP
    Hanalyze.Viz.GPReport
    Hanalyze.Viz.Assets
    Hanalyze.Viz.AnalysisReport
    Hanalyze.Viz.Pareto
    Hanalyze.Viz.Taguchi
    Hanalyze.Viz.ReportBuilder
    Hanalyze.Viz.ReportInstances
  build-depends:
      base                 >= 4.14 && < 5
    , async                >= 2.2  && < 2.3
    , bytestring           >= 0.11 && < 0.13
    , cassava              >= 0.5  && < 0.6
    , containers           >= 0.6  && < 0.8
    , filepath             >= 1.4  && < 1.6
    , hmatrix              >= 0.20 && < 0.22
    , hvega                >= 0.12 && < 0.13
    , mwc-random           >= 0.15 && < 0.16
    , process              >= 1.6  && < 1.8
    , statistics           >= 0.16 && < 0.17
    , text                 >= 1.2  && < 2.2
    , aeson                >= 2.0  && < 2.3
    , directory            >= 1.3  && < 1.4
    , temporary            >= 1.3  && < 1.4
    , unordered-containers >= 0.2  && < 0.3
    , ad                   >= 4.4  && < 4.6
    , vector               >= 0.12 && < 0.14
    , dataframe            >= 0.3  && < 2
    , deepseq              >= 1.4  && < 1.6
    , massiv               >= 1.0  && < 1.1
    , parallel             >= 3.2  && < 3.3
    , vector-algorithms    >= 0.9  && < 0.10

executable hanalyze
  import:           warnings, opt
  main-is:          Main.hs
  hs-source-dirs:   app
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , vector     >= 0.12 && < 0.14
    , hmatrix    >= 0.20 && < 0.22
    , mwc-random >= 0.15 && < 0.16
    , containers >= 0.6  && < 0.8
    , filepath   >= 1.4  && < 1.6
    , hvega      >= 0.12 && < 0.13
    , dataframe  >= 0.3  && < 2
    , time       >= 1.11 && < 1.13

executable glmm-demo
  import:           warnings, opt
  main-is:          Demo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base     >= 4.14 && < 5
    , hanalyze
    , vector   >= 0.12 && < 0.14
    , hmatrix  >= 0.20 && < 0.22
    , text     >= 1.2  && < 2.2
    , dataframe  >= 0.3  && < 2

executable hbm-example
  import:           warnings, opt
  main-is:          HBMExample.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable test-hmc-nuts
  import:           warnings, opt
  main-is:          TestHMCNUTS.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable bench-mcmc
  import:           warnings, opt
  main-is:          BenchMCMC.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16
    , time       >= 1.9  && < 1.15

executable vi-demo
  import:           warnings, opt
  main-is:          VIDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16
    , time       >= 1.9  && < 1.15

executable gibbs-demo
  import:           warnings, opt
  main-is:          GibbsDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16
    , time       >= 1.9  && < 1.15

executable potential-gen
  import:           warnings, opt
  main-is:          PotentialGen.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , mwc-random >= 0.15 && < 0.16

executable regrid-bench-demo
  import:           warnings, opt
  main-is:          RegridBenchDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , dataframe  >= 0.3  && < 2
    , mwc-random >= 0.15 && < 0.16
    , text       >= 1.2  && < 2.2

executable bar-demo
  import:           warnings, opt
  main-is:          BarDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2

executable clinical-trial
  import:           warnings, opt
  main-is:          ClinicalTrial.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable gp-demo
  import:           warnings, opt
  main-is:          GPDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base     >= 4.14 && < 5
    , hanalyze

executable preprocess-demo
  import:           warnings, opt
  main-is:          PreprocessDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , vector     >= 0.12 && < 0.14
    , dataframe  >= 0.3  && < 2

executable dirty-data-demo
  import:           warnings, opt
  main-is:          DirtyDataDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , dataframe  >= 0.3  && < 2

executable external-io-demo
  import:           warnings, opt
  main-is:          ExternalIODemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , vector     >= 0.12 && < 0.14
    , dataframe  >= 0.3  && < 2

executable analysis-compare-demo
  import:           warnings, opt
  main-is:          AnalysisCompareDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , vector     >= 0.12 && < 0.14
    , hmatrix    >= 0.20 && < 0.22
    , mwc-random >= 0.15 && < 0.16
    , containers >= 0.6  && < 0.8
    , dataframe  >= 0.3  && < 2

executable new-sections-demo
  import:           warnings, opt
  main-is:          NewSectionsDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , vector     >= 0.12 && < 0.14
    , hmatrix    >= 0.20 && < 0.22
    , mwc-random >= 0.15 && < 0.16

executable robust-gp-demo
  import:           warnings, opt
  main-is:          RobustGPDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze

executable rff-demo
  import:           warnings, opt
  main-is:          RFFDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , hmatrix    >= 0.20 && < 0.21
    , vector     >= 0.12 && < 0.14
    , mwc-random >= 0.15 && < 0.16
    , time       >= 1.9  && < 1.13

executable gibbs-hbm-demo
  import:           warnings, opt
  main-is:          GibbsHBMDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable newdistribs-demo
  import:           warnings, opt
  main-is:          NewDistribsDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable regularized-demo
  import:           warnings, opt
  main-is:          RegularizedDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , vector     >= 0.12 && < 0.14
    , hmatrix    >= 0.20 && < 0.22
    , mwc-random >= 0.15 && < 0.16

executable optimaldoe-demo
  import:           warnings, opt
  main-is:          OptimalDOEDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2

executable pareto-smoke
  import:           warnings, opt
  main-is:          ParetoSmokeDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze

executable materials-moo-demo
  import:           warnings, opt
  main-is:          MaterialsMOODemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , vector     >= 0.12 && < 0.14
    , hmatrix    >= 0.20 && < 0.22
    , mwc-random >= 0.15 && < 0.16

executable bayesopt-demo
  import:           warnings, opt
  main-is:          BayesOptDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , mwc-random >= 0.15 && < 0.16

executable multirsm-demo
  import:           warnings, opt
  main-is:          MultiRSMDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , hmatrix    >= 0.20 && < 0.22

executable multivariate-demo
  import:           warnings, opt
  main-is:          MultivariateDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , hmatrix    >= 0.20 && < 0.22
    , mwc-random >= 0.15 && < 0.16

executable multilm-demo
  import:           warnings, opt
  main-is:          MultiLMDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , hmatrix    >= 0.20 && < 0.22
    , mwc-random >= 0.15 && < 0.16

executable nsga-demo
  import:           warnings, opt
  main-is:          NSGADemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , mwc-random >= 0.15 && < 0.16
    , text       >= 1.2  && < 2.2
    , vector     >= 0.13 && < 0.14

executable nsga-smoke
  import:           warnings, opt
  main-is:          NSGASmokeDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , mwc-random >= 0.15 && < 0.16

executable rsm-demo
  import:           warnings, opt
  main-is:          RSMDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , hmatrix    >= 0.20 && < 0.22
    , mwc-random >= 0.15 && < 0.16

executable doe-demo
  import:           warnings, opt
  main-is:          DOEDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2

executable kernel-demo
  import:           warnings, opt
  main-is:          KernelDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , vector     >= 0.12 && < 0.14
    , hvega      >= 0.12 && < 0.13
    , mwc-random >= 0.15 && < 0.16

executable spline-demo
  import:           warnings, opt
  main-is:          SplineDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , vector     >= 0.12 && < 0.14
    , hmatrix    >= 0.20 && < 0.22
    , hvega      >= 0.12 && < 0.13
    , mwc-random >= 0.15 && < 0.16

executable integrated-demo
  import:           warnings, opt
  main-is:          IntegratedDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable slice-demo
  import:           warnings, opt
  main-is:          SliceDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable ar1-demo
  import:           warnings, opt
  main-is:          AR1Demo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable lkj3d-demo
  import:           warnings, opt
  main-is:          LKJ3DDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable lkj-demo
  import:           warnings, opt
  main-is:          LKJDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable zeroinflated-demo
  import:           warnings, opt
  main-is:          ZeroInflatedDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable multinomial-demo
  import:           warnings, opt
  main-is:          MultinomialDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable negbinom-demo
  import:           warnings, opt
  main-is:          NegBinomDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable mvnormal-latent-demo
  import:           warnings, opt
  main-is:          MvNormalLatentDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable setdata-demo
  import:           warnings, opt
  main-is:          SetDataDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable dirichlet-demo
  import:           warnings, opt
  main-is:          DirichletDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable noncentered-demo
  import:           warnings, opt
  main-is:          NonCenteredDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable deterministic-demo
  import:           warnings, opt
  main-is:          DeterministicDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable summary-demo
  import:           warnings, opt
  main-is:          SummaryDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable pymc-status-demo
  import:           warnings, opt
  main-is:          PyMCStatusDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2

executable energy-demo
  import:           warnings, opt
  main-is:          EnergyDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable mvnormal-demo
  import:           warnings, opt
  main-is:          MvNormalDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable cdf-test
  import:           warnings, opt
  main-is:          CDFTestDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze

executable trunc-censor-demo
  import:           warnings, opt
  main-is:          TruncCensorDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable mixture-demo
  import:           warnings, opt
  main-is:          MixtureDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable potential-demo
  import:           warnings, opt
  main-is:          PotentialDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable potential-multiout-demo
  import:           warnings, opt
  main-is:          PotentialMultiOut.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , vector     >= 0.12 && < 0.14
    , hmatrix    >= 0.20 && < 0.22

executable potential-multikr-demo
  import:           warnings, opt
  main-is:          PotentialMultiKR.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , vector     >= 0.12 && < 0.14
    , hmatrix    >= 0.20 && < 0.22

executable single-opt-bench-demo
  import:           warnings, opt
  main-is:          SingleOptBench.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , mwc-random >= 0.15 && < 0.16
    , hvega      >= 0.12 && < 0.13

executable forest-compare
  import:           warnings, opt
  main-is:          ForestCompareDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable ppc-demo
  import:           warnings, opt
  main-is:          PPCDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable discrete-obs-demo
  import:           warnings, opt
  main-is:          DiscreteObsDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable new-distrib-demo
  import:           warnings, opt
  main-is:          NewDistribDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16

executable hbm-random-slope
  import:           warnings, opt
  main-is:          HBMRandomSlopeDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16
    , vector     >= 0.12 && < 0.14
    , dataframe  >= 0.3  && < 2

executable simpson-paradox
  import:           warnings, opt
  main-is:          SimpsonParadoxDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16
    , vector     >= 0.12 && < 0.14
    , hmatrix    >= 0.20 && < 0.22
    , dataframe  >= 0.3  && < 2

executable hbm-regression
  import:           warnings, opt
  main-is:          HBMRegressionDemo.hs
  hs-source-dirs:   demo demo/regression demo/doe-optim demo/bayesian demo/visualization demo/io
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , text       >= 1.2  && < 2.2
    , containers >= 0.6  && < 0.8
    , mwc-random >= 0.15 && < 0.16
    , vector     >= 0.12 && < 0.14
    , dataframe  >= 0.3  && < 2

-- Bench data generator: produces deterministic CSVs that both the Haskell
-- benchmarks and the Python comparison scripts read. (See bench/README.md.)
executable bench-data-gen
  import:           warnings, opt
  main-is:          BenchDataGen.hs
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  build-depends:
      base                 >= 4.14 && < 5
    , directory            >= 1.3  && < 1.4
    , hmatrix              >= 0.20 && < 0.22
    , mwc-random           >= 0.15 && < 0.16
    , vector               >= 0.12 && < 0.14

-- Bayesian optimization bench (B5): Branin / Hartmann6.
executable bench-bo
  import:           warnings, opt
  main-is:          BenchBO.hs
  other-modules:    BenchUtil
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  build-depends:
      base                 >= 4.14 && < 5
    , bytestring           >= 0.11 && < 0.13
    , cassava              >= 0.5  && < 0.6
    , hanalyze
    , hmatrix              >= 0.20 && < 0.22
    , mwc-random           >= 0.15 && < 0.16
    , text                 >= 1.2  && < 2.2
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.12 && < 0.14
    , tasty-bench          >= 0.3  && < 0.5
    , tasty                >= 1.4  && < 1.6

-- Standalone bench: hmatrix vs massiv on pairwise squared distance
-- (F4 evaluation, F5 multi-core Par evaluation).
executable bench-massiv
  import:           warnings, opt
  main-is:          BenchMassiv.hs
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  ghc-options:      -threaded -rtsopts -with-rtsopts=-N
  build-depends:
      base                 >= 4.14 && < 5
    , hanalyze
    , hmatrix              >= 0.20 && < 0.22
    , massiv               >= 1.0  && < 1.1
    , time                 >= 1.9  && < 1.13
    , deepseq              >= 1.4  && < 1.6

-- Multi-objective optimization bench (B4): NSGA-II on ZDT/DTLZ.
executable bench-mo
  import:           warnings, opt
  main-is:          BenchMO.hs
  other-modules:    BenchUtil
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  build-depends:
      base                 >= 4.14 && < 5
    , bytestring           >= 0.11 && < 0.13
    , cassava              >= 0.5  && < 0.6
    , hanalyze
    , hmatrix              >= 0.20 && < 0.22
    , mwc-random           >= 0.15 && < 0.16
    , text                 >= 1.2  && < 2.2
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.12 && < 0.14
    , tasty-bench          >= 0.3  && < 0.5
    , tasty                >= 1.4  && < 1.6

-- Standalone investigation: P37 Cheng-BB Beta sampler vs 2-Gamma + division.
executable bench-beta-isolate
  import:           warnings, opt
  main-is:          BenchBetaIsolate.hs
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  build-depends:
      base                 >= 4.14 && < 5
    , hanalyze
    , mwc-random           >= 0.15 && < 0.16
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.12 && < 0.14

-- Standalone investigation: P40 Bootstrap resampling hot-path
-- (uniformVector batch + GEMV row-sum vs naive index-loop).
executable bench-bootstrap-isolate
  import:           warnings, opt
  main-is:          BenchBootstrapIsolate.hs
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  build-depends:
      base                 >= 4.14 && < 5
    , hmatrix              >= 0.20 && < 0.22
    , mwc-random           >= 0.15 && < 0.16
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.12 && < 0.14

-- Single-objective optimization bench (B3).
executable bench-optim
  import:           warnings, opt
  main-is:          BenchOptim.hs
  other-modules:    BenchUtil
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  build-depends:
      base                 >= 4.14 && < 5
    , bytestring           >= 0.11 && < 0.13
    , cassava              >= 0.5  && < 0.6
    , hanalyze
    , hmatrix              >= 0.20 && < 0.22
    , mwc-random           >= 0.15 && < 0.16
    , text                 >= 1.2  && < 2.2
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.12 && < 0.14
    , tasty-bench          >= 0.3  && < 0.5
    , tasty                >= 1.4  && < 1.6

-- OOM regression bench (Phase 11b): RFF.medianPairwiseDist + rbfKernelMat.
executable bench-rff-oom
  import:           warnings, opt
  main-is:          BenchRFFOOM.hs
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  ghc-options:      -rtsopts
  build-depends:
      base                 >= 4.14 && < 5
    , hanalyze
    , hmatrix              >= 0.20 && < 0.22
    , time                 >= 1.9  && < 1.13

executable bench-mem-vi
  import:           warnings, opt
  main-is:          BenchMemVI.hs
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  ghc-options:      -rtsopts
  build-depends:
      base                 >= 4.14 && < 5
    , hanalyze
    , containers           >= 0.6  && < 0.8
    , text                 >= 1.2  && < 2.2
    , time                 >= 1.9  && < 1.13
    , mwc-random           >= 0.15 && < 0.16

executable bench-mem-aggregate
  import:           warnings, opt
  main-is:          BenchMemAggregate.hs
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  ghc-options:      -rtsopts
  build-depends:
      base                 >= 4.14 && < 5
    , hanalyze
    , dataframe            >= 0.3  && < 2
    , text                 >= 1.2  && < 2.2
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.13 && < 0.14

executable bench-mem-nsga2
  import:           warnings, opt
  main-is:          BenchMemNSGA.hs
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  ghc-options:      -rtsopts
  build-depends:
      base                 >= 4.14 && < 5
    , hanalyze
    , time                 >= 1.9  && < 1.13
    , mwc-random           >= 0.15 && < 0.16

executable bench-mem-bo
  import:           warnings, opt
  main-is:          BenchMemBO.hs
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  ghc-options:      -rtsopts
  build-depends:
      base                 >= 4.14 && < 5
    , hanalyze
    , time                 >= 1.9  && < 1.13
    , mwc-random           >= 0.15 && < 0.16

executable bench-mem-mcmc
  import:           warnings, opt
  main-is:          BenchMemMCMC.hs
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  ghc-options:      -rtsopts
  build-depends:
      base                 >= 4.14 && < 5
    , hanalyze
    , containers           >= 0.6  && < 0.8
    , text                 >= 1.2  && < 2.2
    , time                 >= 1.9  && < 1.13
    , mwc-random           >= 0.15 && < 0.16

-- Kernel / GP bench (B2): KR / NW / RFF / GP / GPRobust.
executable bench-kernel
  import:           warnings, opt
  main-is:          BenchKernel.hs
  other-modules:    BenchUtil
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  build-depends:
      base                 >= 4.14 && < 5
    , bytestring           >= 0.11 && < 0.13
    , cassava              >= 0.5  && < 0.6
    , hanalyze
    , hmatrix              >= 0.20 && < 0.22
    , mwc-random           >= 0.15 && < 0.16
    , text                 >= 1.2  && < 2.2
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.12 && < 0.14
    , tasty-bench          >= 0.3  && < 0.5
    , tasty                >= 1.4  && < 1.6

-- ML bench (B6): PCA / KMeans / DecisionTree / RandomForest.
executable bench-ml
  import:           warnings, opt
  main-is:          BenchML.hs
  other-modules:    BenchUtil
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  build-depends:
      base                 >= 4.14 && < 5
    , bytestring           >= 0.11 && < 0.13
    , cassava              >= 0.5  && < 0.6
    , hanalyze
    , hmatrix              >= 0.20 && < 0.22
    , mwc-random           >= 0.15 && < 0.16
    , text                 >= 1.2  && < 2.2
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.12 && < 0.14
    , tasty-bench          >= 0.3  && < 0.5
    , tasty                >= 1.4  && < 1.6

-- Survival / TimeSeries bench (B8): ARIMA / Cox / KM / Quantile / GAM / Spline.
executable bench-survts
  import:           warnings, opt
  main-is:          BenchSurvTS.hs
  other-modules:    BenchUtil
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  build-depends:
      base                 >= 4.14 && < 5
    , bytestring           >= 0.11 && < 0.13
    , cassava              >= 0.5  && < 0.6
    , hanalyze
    , hmatrix              >= 0.20 && < 0.22
    , random               >= 1.2  && < 1.4
    , text                 >= 1.2  && < 2.2
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.12 && < 0.14
    , tasty-bench          >= 0.3  && < 0.5
    , tasty                >= 1.4  && < 1.6

-- MCMC diagnostic (B10b): explore why hanalyze NUTS ESS is poor.
executable bench-mcmc-diag
  import:           warnings, opt
  main-is:          BenchMCMCDiag.hs
  other-modules:    BenchUtil
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  build-depends:
      base                 >= 4.14 && < 5
    , bytestring           >= 0.11 && < 0.13
    , cassava              >= 0.5  && < 0.6
    , containers           >= 0.6  && < 0.8
    , hanalyze
    , hmatrix              >= 0.20 && < 0.22
    , mwc-random           >= 0.15 && < 0.16
    , text                 >= 1.2  && < 2.2
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.12 && < 0.14
    , tasty-bench          >= 0.3  && < 0.5
    , tasty                >= 1.4  && < 1.6

-- MCMC bench (B7): HMC / NUTS on hierarchical normal model.
executable bench-mcmc-b7
  import:           warnings, opt
  main-is:          BenchMCMCB7.hs
  other-modules:    BenchUtil
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  build-depends:
      base                 >= 4.14 && < 5
    , bytestring           >= 0.11 && < 0.13
    , cassava              >= 0.5  && < 0.6
    , containers           >= 0.6  && < 0.8
    , hanalyze
    , hmatrix              >= 0.20 && < 0.22
    , mwc-random           >= 0.15 && < 0.16
    , text                 >= 1.2  && < 2.2
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.12 && < 0.14
    , tasty-bench          >= 0.3  && < 0.5
    , tasty                >= 1.4  && < 1.6

-- B7 残: Gibbs / ADVI / WAIC.
executable bench-mcmc-extras
  import:           warnings, opt
  main-is:          BenchMCMCExtras.hs
  other-modules:    BenchUtil
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  build-depends:
      base                 >= 4.14 && < 5
    , bytestring           >= 0.11 && < 0.13
    , cassava              >= 0.5  && < 0.6
    , containers           >= 0.6  && < 0.8
    , hanalyze
    , hmatrix              >= 0.20 && < 0.22
    , mwc-random           >= 0.15 && < 0.16
    , text                 >= 1.2  && < 2.2
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.12 && < 0.14
    , tasty-bench          >= 0.3  && < 0.5
    , tasty                >= 1.4  && < 1.6

-- B13 Regrid: regridLong on a jagged long-form fixture.
executable bench-regrid
  import:           warnings, opt
  main-is:          BenchRegrid.hs
  other-modules:    BenchUtil
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  build-depends:
      base                 >= 4.14 && < 5
    , bytestring           >= 0.11 && < 0.13
    , cassava              >= 0.5  && < 0.6
    , dataframe            >= 0.4
    , hanalyze
    , hmatrix              >= 0.20 && < 0.22
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.12 && < 0.14
    , tasty-bench          >= 0.3  && < 0.5
    , tasty                >= 1.4  && < 1.6

-- B12 Multi-output: MultiLM / MultiGP.
executable bench-multi-output
  import:           warnings, opt
  main-is:          BenchMultiOutput.hs
  other-modules:    BenchUtil
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  build-depends:
      base                 >= 4.14 && < 5
    , bytestring           >= 0.11 && < 0.13
    , cassava              >= 0.5  && < 0.6
    , hanalyze
    , hmatrix              >= 0.20 && < 0.22
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.12 && < 0.14
    , tasty-bench          >= 0.3  && < 0.5
    , tasty                >= 1.4  && < 1.6

-- B10 Stat util: Bootstrap / t-test / KS / MW / BH / Halton / AUC / k-fold.
executable bench-stat-util
  import:           warnings, opt
  main-is:          BenchStatUtil.hs
  other-modules:    BenchUtil
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  build-depends:
      base                 >= 4.14 && < 5
    , bytestring           >= 0.11 && < 0.13
    , cassava              >= 0.5  && < 0.6
    , hanalyze
    , hmatrix              >= 0.20 && < 0.22
    , mwc-random           >= 0.15 && < 0.16
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.12 && < 0.14
    , tasty-bench          >= 0.3  && < 0.5
    , tasty                >= 1.4  && < 1.6

-- B9 Optim+: Constrained / Adam / CMAESFull.
executable bench-optim-plus
  import:           warnings, opt
  main-is:          BenchOptimPlus.hs
  other-modules:    BenchUtil
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  build-depends:
      base                 >= 4.14 && < 5
    , bytestring           >= 0.11 && < 0.13
    , cassava              >= 0.5  && < 0.6
    , hanalyze
    , hmatrix              >= 0.20 && < 0.22
    , mwc-random           >= 0.15 && < 0.16
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.12 && < 0.14
    , tasty-bench          >= 0.3  && < 0.5
    , tasty                >= 1.4  && < 1.6

-- B8 残: Holt-Winters / GAM / Spline 補間.
executable bench-ts-extras
  import:           warnings, opt
  main-is:          BenchTSExtras.hs
  other-modules:    BenchUtil
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  build-depends:
      base                 >= 4.14 && < 5
    , bytestring           >= 0.11 && < 0.13
    , cassava              >= 0.5  && < 0.6
    , hanalyze
    , hmatrix              >= 0.20 && < 0.22
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.12 && < 0.14
    , tasty-bench          >= 0.3  && < 0.5
    , tasty                >= 1.4  && < 1.6

-- Regression bench (B1): LM / GLM / GLMM / Ridge / Lasso / ElasticNet.
executable bench-regression
  import:           warnings, opt
  main-is:          BenchRegression.hs
  other-modules:    BenchUtil
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  build-depends:
      base                 >= 4.14 && < 5
    , bytestring           >= 0.11 && < 0.13
    , cassava              >= 0.5  && < 0.6
    , hanalyze
    , hmatrix              >= 0.20 && < 0.22
    , text                 >= 1.2  && < 2.2
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.12 && < 0.14
    , tasty-bench          >= 0.3  && < 0.5
    , tasty                >= 1.4  && < 1.6

executable bench-profile
  import:           warnings, opt
  main-is:          BenchProfile.hs
  other-modules:    BenchUtil
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  ghc-options:      -rtsopts "-with-rtsopts=-T"
  build-depends:
      base                 >= 4.14 && < 5
    , bytestring           >= 0.11 && < 0.13
    , cassava              >= 0.5  && < 0.6
    , deepseq              >= 1.4  && < 1.6
    , hanalyze
    , hmatrix              >= 0.20 && < 0.22
    , text                 >= 1.2  && < 2.2
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.12 && < 0.14
    , tasty-bench          >= 0.3  && < 0.5
    , tasty                >= 1.4  && < 1.6

executable bench-tasty
  import:           warnings, opt
  main-is:          BenchTasty.hs
  other-modules:    BenchUtil
  hs-source-dirs:   bench/haskell
  default-language: GHC2021
  build-depends:
      base                 >= 4.14 && < 5
    , bytestring           >= 0.11 && < 0.13
    , cassava              >= 0.5  && < 0.6
    , hanalyze
    , hmatrix              >= 0.20 && < 0.22
    , tasty-bench          >= 0.3  && < 0.5
    , tasty                >= 1.4  && < 1.6
    , text                 >= 1.2  && < 2.2
    , time                 >= 1.9  && < 1.13
    , vector               >= 0.12 && < 0.14

test-suite hanalyze-test
  import:           warnings, opt
  type:             exitcode-stdio-1.0
  main-is:          Spec.hs
  hs-source-dirs:   test
  default-language: GHC2021
  build-depends:
      base       >= 4.14 && < 5
    , hanalyze
    , hspec      >= 2.10 && < 2.12
    , vector     >= 0.12 && < 0.14
    , mwc-random >= 0.15 && < 0.16
    , text       >= 1.2  && < 2.2
    , dataframe  >= 0.3  && < 2
    , temporary  >= 1.3  && < 1.4
    , bytestring >= 0.11 && < 0.13
    , hmatrix    >= 0.20 && < 0.22