From a0820834aa201f8693401a4481b45e3eeaa78ddc Mon Sep 17 00:00:00 2001 From: Masahiro Sakai Date: Thu, 23 May 2024 20:39:01 +0900 Subject: [PATCH 1/4] fix to work with mtl >=2.3 mtl 2.3 removes re-exports of Control.Monad module. --- numeric-optimization/src/Numeric/Optimization/Utils/ToVector.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/numeric-optimization/src/Numeric/Optimization/Utils/ToVector.hs b/numeric-optimization/src/Numeric/Optimization/Utils/ToVector.hs index 0262a90..960b5b6 100644 --- a/numeric-optimization/src/Numeric/Optimization/Utils/ToVector.hs +++ b/numeric-optimization/src/Numeric/Optimization/Utils/ToVector.hs @@ -39,6 +39,7 @@ module Numeric.Optimization.Utils.ToVector , updateFromVectorMonoTraversable ) where +import Control.Monad import Control.Monad.Primitive import Control.Monad.State import qualified Data.MonoTraversable as MT From 4814178e76fbc721d6b53f6391b00cc36b33059a Mon Sep 17 00:00:00 2001 From: Masahiro Sakai Date: Thu, 23 May 2024 22:34:58 +0900 Subject: [PATCH 2/4] relax upper bound of containers package to allow containers-0.7 --- numeric-optimization-ad/package.yaml | 2 +- numeric-optimization-backprop/package.yaml | 2 +- numeric-optimization/package.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/numeric-optimization-ad/package.yaml b/numeric-optimization-ad/package.yaml index 0f78090..03a536c 100644 --- a/numeric-optimization-ad/package.yaml +++ b/numeric-optimization-ad/package.yaml @@ -84,7 +84,7 @@ tests: - -rtsopts - -with-rtsopts=-N dependencies: - - containers >=0.6.0.1 && <0.7 + - containers >=0.6.0.1 && <0.8 - hspec >=2.7.1 && <3.0 - HUnit >=1.6.0.0 && <1.7 - numeric-optimization-ad diff --git a/numeric-optimization-backprop/package.yaml b/numeric-optimization-backprop/package.yaml index 83a41e0..d1e838c 100644 --- a/numeric-optimization-backprop/package.yaml +++ b/numeric-optimization-backprop/package.yaml @@ -35,7 +35,7 @@ flags: dependencies: - base >=4.12 && <5 -- containers >=0.6.0.1 && <0.7 +- containers >=0.6.0.1 && <0.8 - data-default-class >=0.1.2.0 && <0.2 - numeric-optimization >=0.2.0.0 && <0.3.0.0 diff --git a/numeric-optimization/package.yaml b/numeric-optimization/package.yaml index dbc06f6..88b3ac5 100644 --- a/numeric-optimization/package.yaml +++ b/numeric-optimization/package.yaml @@ -68,7 +68,7 @@ library: source-dirs: src dependencies: - constraints - - containers >=0.6.0.1 && <0.7 + - containers >=0.6.0.1 && <0.8 - hmatrix >=0.20.0.0 - numeric-limits >=0.1 && <0.2 - mono-traversable >=1.0.15.1 && <1.1 @@ -126,7 +126,7 @@ tests: - -rtsopts - -with-rtsopts=-N dependencies: - - containers >=0.6.0.1 && <0.7 + - containers >=0.6.0.1 && <0.8 - hmatrix - hspec >=2.7.1 && <3.0 - HUnit >=1.6.0.0 && <1.7 From 22821ec933cd57fdc6ba64eaf6d3756738b0920e Mon Sep 17 00:00:00 2001 From: Masahiro Sakai Date: Thu, 23 May 2024 20:45:21 +0900 Subject: [PATCH 3/4] update stackage snapshots --- .github/workflows/build.yaml | 11 ++- .../nonlinear-optimization-ad.cabal | 2 +- .../nonlinear-optimization-backprop.cabal | 2 +- .../numeric-optimization-ad-delcont.cabal | 8 +- numeric-optimization-ad-delcont/package.yaml | 4 +- .../numeric-optimization-ad.cabal | 8 +- numeric-optimization-ad/package.yaml | 4 +- .../numeric-optimization-backprop.cabal | 8 +- numeric-optimization-backprop/package.yaml | 4 +- .../numeric-optimization.cabal | 8 +- numeric-optimization/package.yaml | 4 +- stack-ghc-9.2.yaml | 2 +- stack-ghc-9.4.yaml | 2 +- stack-ghc-9.6.yaml | 91 +++++++++++++++++++ stack-ghc-9.8.yaml | 91 +++++++++++++++++++ 15 files changed, 228 insertions(+), 21 deletions(-) create mode 100644 stack-ghc-9.6.yaml create mode 100644 stack-ghc-9.8.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9f64727..08ee1c2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -30,7 +30,7 @@ jobs: os: ubuntu-latest stack_yaml: 'stack-ghc-9.0.yaml' flags: '' - - ghc: '9.2.7' + - ghc: '9.2.8' os: ubuntu-latest stack_yaml: 'stack-ghc-9.2.yaml' flags: '' @@ -48,6 +48,15 @@ jobs: os: windows-latest stack_yaml: 'stack-ghc-9.4.yaml' flags: '' + + - ghc: '9.6.5' + os: ubuntu-latest + stack_yaml: 'stack-ghc-9.6.yaml' + flags: '' + - ghc: '9.8.2' + os: ubuntu-latest + stack_yaml: 'stack-ghc-9.8.yaml' + flags: '' steps: - uses: actions/checkout@v4 diff --git a/nonlinear-optimization-ad/nonlinear-optimization-ad.cabal b/nonlinear-optimization-ad/nonlinear-optimization-ad.cabal index 22cee44..b153e59 100644 --- a/nonlinear-optimization-ad/nonlinear-optimization-ad.cabal +++ b/nonlinear-optimization-ad/nonlinear-optimization-ad.cabal @@ -26,7 +26,7 @@ extra-source-files: CHANGELOG.markdown samples/galton.csv -tested-with: GHC == 9.4.5, GHC == 9.2.7, GHC == 9.0.2, +tested-with: GHC == 9.8.2, GHC == 9.6.5, GHC == 9.4.5, GHC == 9.2.8, GHC == 9.0.2, GHC == 8.10.7, GHC == 8.8.4, GHC == 8.6.5 source-repository head diff --git a/nonlinear-optimization-backprop/nonlinear-optimization-backprop.cabal b/nonlinear-optimization-backprop/nonlinear-optimization-backprop.cabal index 2ae551d..a83e4c9 100644 --- a/nonlinear-optimization-backprop/nonlinear-optimization-backprop.cabal +++ b/nonlinear-optimization-backprop/nonlinear-optimization-backprop.cabal @@ -26,7 +26,7 @@ extra-source-files: CHANGELOG.markdown samples/galton.csv -tested-with: GHC == 9.4.5, GHC == 9.2.7, GHC == 9.0.2, +tested-with: GHC == 9.8.2, GHC == 9.6.5, GHC == 9.4.5, GHC == 9.2.8, GHC == 9.0.2, GHC == 8.10.7, GHC == 8.8.4, GHC == 8.6.5 source-repository head diff --git a/numeric-optimization-ad-delcont/numeric-optimization-ad-delcont.cabal b/numeric-optimization-ad-delcont/numeric-optimization-ad-delcont.cabal index 2c3aa17..fef2683 100644 --- a/numeric-optimization-ad-delcont/numeric-optimization-ad-delcont.cabal +++ b/numeric-optimization-ad-delcont/numeric-optimization-ad-delcont.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.1. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack @@ -18,8 +18,10 @@ license: BSD3 license-file: LICENSE build-type: Simple tested-with: - GHC == 9.4.5 - , GHC == 9.2.7 + GHC == 9.8.2 + , GHC == 9.6.5 + , GHC == 9.4.5 + , GHC == 9.2.8 , GHC == 9.0.2 , GHC == 8.10.7 , GHC == 8.8.4 diff --git a/numeric-optimization-ad-delcont/package.yaml b/numeric-optimization-ad-delcont/package.yaml index 97f1e74..703cce0 100644 --- a/numeric-optimization-ad-delcont/package.yaml +++ b/numeric-optimization-ad-delcont/package.yaml @@ -20,8 +20,10 @@ category: Math, Algorithms, Optimisation, Optimization, Numeric, Nume description: Please see the README on GitHub at tested-with: +- GHC == 9.8.2 +- GHC == 9.6.5 - GHC == 9.4.5 -- GHC == 9.2.7 +- GHC == 9.2.8 - GHC == 9.0.2 - GHC == 8.10.7 - GHC == 8.8.4 diff --git a/numeric-optimization-ad/numeric-optimization-ad.cabal b/numeric-optimization-ad/numeric-optimization-ad.cabal index b00fe28..d5b9f51 100644 --- a/numeric-optimization-ad/numeric-optimization-ad.cabal +++ b/numeric-optimization-ad/numeric-optimization-ad.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.1. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack @@ -18,8 +18,10 @@ license: BSD3 license-file: LICENSE build-type: Simple tested-with: - GHC == 9.4.5 - , GHC == 9.2.7 + GHC == 9.8.2 + , GHC == 9.6.5 + , GHC == 9.4.5 + , GHC == 9.2.8 , GHC == 9.0.2 , GHC == 8.10.7 , GHC == 8.8.4 diff --git a/numeric-optimization-ad/package.yaml b/numeric-optimization-ad/package.yaml index 03a536c..7b056b9 100644 --- a/numeric-optimization-ad/package.yaml +++ b/numeric-optimization-ad/package.yaml @@ -20,8 +20,10 @@ category: Math, Algorithms, Optimisation, Optimization, Numeric, Nume description: Please see the README on GitHub at tested-with: +- GHC == 9.8.2 +- GHC == 9.6.5 - GHC == 9.4.5 -- GHC == 9.2.7 +- GHC == 9.2.8 - GHC == 9.0.2 - GHC == 8.10.7 - GHC == 8.8.4 diff --git a/numeric-optimization-backprop/numeric-optimization-backprop.cabal b/numeric-optimization-backprop/numeric-optimization-backprop.cabal index 45dd497..e2faa50 100644 --- a/numeric-optimization-backprop/numeric-optimization-backprop.cabal +++ b/numeric-optimization-backprop/numeric-optimization-backprop.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.1. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack @@ -18,8 +18,10 @@ license: BSD3 license-file: LICENSE build-type: Simple tested-with: - GHC == 9.4.5 - , GHC == 9.2.7 + GHC == 9.8.2 + , GHC == 9.6.5 + , GHC == 9.4.5 + , GHC == 9.2.8 , GHC == 9.0.2 , GHC == 8.10.7 , GHC == 8.8.4 diff --git a/numeric-optimization-backprop/package.yaml b/numeric-optimization-backprop/package.yaml index d1e838c..8d7b5b8 100644 --- a/numeric-optimization-backprop/package.yaml +++ b/numeric-optimization-backprop/package.yaml @@ -20,8 +20,10 @@ category: Math, Algorithms, Optimisation, Optimization, Numeric, Nume description: Please see the README on GitHub at tested-with: +- GHC == 9.8.2 +- GHC == 9.6.5 - GHC == 9.4.5 -- GHC == 9.2.7 +- GHC == 9.2.8 - GHC == 9.0.2 - GHC == 8.10.7 - GHC == 8.8.4 diff --git a/numeric-optimization/numeric-optimization.cabal b/numeric-optimization/numeric-optimization.cabal index 55efd42..2a8d63d 100644 --- a/numeric-optimization/numeric-optimization.cabal +++ b/numeric-optimization/numeric-optimization.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.1. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack @@ -18,8 +18,10 @@ license: BSD3 license-file: LICENSE build-type: Simple tested-with: - GHC == 9.4.5 - , GHC == 9.2.7 + GHC == 9.8.2 + , GHC == 9.6.5 + , GHC == 9.4.5 + , GHC == 9.2.8 , GHC == 9.0.2 , GHC == 8.10.7 , GHC == 8.8.4 diff --git a/numeric-optimization/package.yaml b/numeric-optimization/package.yaml index 88b3ac5..8388426 100644 --- a/numeric-optimization/package.yaml +++ b/numeric-optimization/package.yaml @@ -20,8 +20,10 @@ category: Math, Algorithms, Optimisation, Optimization, Numeric, Nume description: Please see the README on GitHub at tested-with: +- GHC == 9.8.2 +- GHC == 9.6.5 - GHC == 9.4.5 -- GHC == 9.2.7 +- GHC == 9.2.8 - GHC == 9.0.2 - GHC == 8.10.7 - GHC == 8.8.4 diff --git a/stack-ghc-9.2.yaml b/stack-ghc-9.2.yaml index 6d0359d..a5bbd63 100644 --- a/stack-ghc-9.2.yaml +++ b/stack-ghc-9.2.yaml @@ -15,7 +15,7 @@ # resolver: # name: custom-snapshot # location: "./custom-snapshot.yaml" -resolver: lts-20.20 +resolver: lts-20.26 # User packages to be built. # Various formats can be used as shown in the example below. diff --git a/stack-ghc-9.4.yaml b/stack-ghc-9.4.yaml index da2ca73..e5da0e2 100644 --- a/stack-ghc-9.4.yaml +++ b/stack-ghc-9.4.yaml @@ -15,7 +15,7 @@ # resolver: # name: custom-snapshot # location: "./custom-snapshot.yaml" -resolver: nightly-2023-05-08 +resolver: lts-21.25 # User packages to be built. # Various formats can be used as shown in the example below. diff --git a/stack-ghc-9.6.yaml b/stack-ghc-9.6.yaml new file mode 100644 index 0000000..81994e8 --- /dev/null +++ b/stack-ghc-9.6.yaml @@ -0,0 +1,91 @@ +# This file was automatically generated by 'stack init' +# +# Some commonly used options have been documented as comments in this file. +# For advanced use and comprehensive documentation of the format, please see: +# https://docs.haskellstack.org/en/stable/yaml_configuration/ + +# Resolver to choose a 'specific' stackage snapshot or a compiler version. +# A snapshot resolver dictates the compiler version and the set of packages +# to be used for project dependencies. For example: +# +# resolver: lts-3.5 +# resolver: nightly-2015-09-21 +# resolver: ghc-7.10.2 +# resolver: ghcjs-0.1.0_ghc-7.10.2 +# resolver: +# name: custom-snapshot +# location: "./custom-snapshot.yaml" +resolver: lts-22.22 + +# User packages to be built. +# Various formats can be used as shown in the example below. +# +# packages: +# - some-directory +# - https://example.com/foo/bar/baz-0.0.2.tar.gz +# - location: +# git: https://github.com/commercialhaskell/stack.git +# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a +# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a +# extra-dep: true +# subdirs: +# - auto-update +# - wai +# +# A package marked 'extra-dep: true' will only be built if demanded by a +# non-dependency (i.e. a user package), and its test suites and benchmarks +# will not be run. This is useful for tweaking upstream packages. +packages: +- nonlinear-optimization-ad +- nonlinear-optimization-backprop +- numeric-optimization +- numeric-optimization-ad +- numeric-optimization-ad-delcont +- numeric-optimization-backprop + +# Dependency packages to be pulled from upstream that are not in the resolver +# (e.g., acme-missiles-0.3) +# extra-deps: [] +extra-deps: +- git: https://github.com/msakai/nonlinear-optimization.git + commit: 3d1bc729df511ed7c6635a23fb191aef313e4583 +- backprop-0.2.6.5 +- git: https://github.com/wavewave/lbfgs-hs.git + commit: 700f5a2295ff8a7f2ffb1ef3e9407e2468f683b7 +- l-bfgs-b-0.1.0.1 +- ad-delcont-0.5.0.0 + +# Override default flag values for local packages and extra-deps +# flags: {} +flags: + numeric-optimization: + with-cg-descent: true + with-lbfgsb: true + build-examples: true + numeric-optimization-ad: + build-examples: true + numeric-optimization-ad-delcont: + build-examples: true + numeric-optimization-backprop: + build-examples: true + +# Extra package databases containing global packages +# extra-package-dbs: [] + +# Control whether we use the GHC we find on the path +# system-ghc: true +# +# Require a specific version of stack, using version ranges +# require-stack-version: -any # Default +# require-stack-version: ">=1.6" +# +# Override the architecture used by stack, especially useful on Windows +# arch: i386 +# arch: x86_64 +# +# Extra directories used by stack for building +# extra-include-dirs: [/path/to/dir] +# extra-lib-dirs: [/path/to/dir] +# +# Allow a newer minor version of GHC than the snapshot specifies +# compiler-check: newer-minor diff --git a/stack-ghc-9.8.yaml b/stack-ghc-9.8.yaml new file mode 100644 index 0000000..949edde --- /dev/null +++ b/stack-ghc-9.8.yaml @@ -0,0 +1,91 @@ +# This file was automatically generated by 'stack init' +# +# Some commonly used options have been documented as comments in this file. +# For advanced use and comprehensive documentation of the format, please see: +# https://docs.haskellstack.org/en/stable/yaml_configuration/ + +# Resolver to choose a 'specific' stackage snapshot or a compiler version. +# A snapshot resolver dictates the compiler version and the set of packages +# to be used for project dependencies. For example: +# +# resolver: lts-3.5 +# resolver: nightly-2015-09-21 +# resolver: ghc-7.10.2 +# resolver: ghcjs-0.1.0_ghc-7.10.2 +# resolver: +# name: custom-snapshot +# location: "./custom-snapshot.yaml" +resolver: nightly-2024-05-23 + +# User packages to be built. +# Various formats can be used as shown in the example below. +# +# packages: +# - some-directory +# - https://example.com/foo/bar/baz-0.0.2.tar.gz +# - location: +# git: https://github.com/commercialhaskell/stack.git +# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a +# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a +# extra-dep: true +# subdirs: +# - auto-update +# - wai +# +# A package marked 'extra-dep: true' will only be built if demanded by a +# non-dependency (i.e. a user package), and its test suites and benchmarks +# will not be run. This is useful for tweaking upstream packages. +packages: +- nonlinear-optimization-ad +- nonlinear-optimization-backprop +- numeric-optimization +- numeric-optimization-ad +- numeric-optimization-ad-delcont +- numeric-optimization-backprop + +# Dependency packages to be pulled from upstream that are not in the resolver +# (e.g., acme-missiles-0.3) +# extra-deps: [] +extra-deps: +- git: https://github.com/msakai/nonlinear-optimization.git + commit: e524821f80e4362098558095e49adb3646e4a00a +- backprop-0.2.6.5 +- git: https://github.com/wavewave/lbfgs-hs.git + commit: 700f5a2295ff8a7f2ffb1ef3e9407e2468f683b7 +- l-bfgs-b-0.1.0.1 +- ad-delcont-0.5.0.0 + +# Override default flag values for local packages and extra-deps +# flags: {} +flags: + numeric-optimization: + with-cg-descent: true + with-lbfgsb: true + build-examples: true + numeric-optimization-ad: + build-examples: true + numeric-optimization-ad-delcont: + build-examples: true + numeric-optimization-backprop: + build-examples: true + +# Extra package databases containing global packages +# extra-package-dbs: [] + +# Control whether we use the GHC we find on the path +# system-ghc: true +# +# Require a specific version of stack, using version ranges +# require-stack-version: -any # Default +# require-stack-version: ">=1.6" +# +# Override the architecture used by stack, especially useful on Windows +# arch: i386 +# arch: x86_64 +# +# Extra directories used by stack for building +# extra-include-dirs: [/path/to/dir] +# extra-lib-dirs: [/path/to/dir] +# +# Allow a newer minor version of GHC than the snapshot specifies +# compiler-check: newer-minor From f2078a7fe996c5726fd23fdf6141f1d9f423516f Mon Sep 17 00:00:00 2001 From: Masahiro Sakai Date: Thu, 23 May 2024 20:48:58 +0900 Subject: [PATCH 4/4] update default stack snapshot --- .github/workflows/build.yaml | 12 ++++++------ stack.yaml | 7 +++++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 08ee1c2..202ef12 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -38,21 +38,21 @@ jobs: os: ubuntu-latest stack_yaml: 'stack-ghc-9.4.yaml' flags: '' + - ghc: '9.6.5' + os: ubuntu-latest + stack_yaml: 'stack-ghc-9.6.yaml' + flags: '' - - ghc: '9.4.5' + - ghc: '9.6.5' os: macos-latest stack_yaml: 'stack-ghc-9.4.yaml' flags: '' - - ghc: '9.4.5' + - ghc: '9.6.5' os: windows-latest stack_yaml: 'stack-ghc-9.4.yaml' flags: '' - - ghc: '9.6.5' - os: ubuntu-latest - stack_yaml: 'stack-ghc-9.6.yaml' - flags: '' - ghc: '9.8.2' os: ubuntu-latest stack_yaml: 'stack-ghc-9.8.yaml' diff --git a/stack.yaml b/stack.yaml index 5fc4dd4..fb2f5c0 100644 --- a/stack.yaml +++ b/stack.yaml @@ -15,7 +15,7 @@ # resolver: # name: custom-snapshot # location: "./custom-snapshot.yaml" -resolver: lts-18.28 +resolver: lts-22.22 # User packages to be built. # Various formats can be used as shown in the example below. @@ -47,9 +47,12 @@ packages: # (e.g., acme-missiles-0.3) # extra-deps: [] extra-deps: -- nonlinear-optimization-0.3.12.1@sha256:2b4efff8549256c2a301d28c7c21edddab0d30a16add8b9dbb02343901bf1212,2634 +- git: https://github.com/msakai/nonlinear-optimization.git + commit: 3d1bc729df511ed7c6635a23fb191aef313e4583 +- backprop-0.2.6.5 - git: https://github.com/wavewave/lbfgs-hs.git commit: 700f5a2295ff8a7f2ffb1ef3e9407e2468f683b7 +- l-bfgs-b-0.1.0.1 - ad-delcont-0.5.0.0 # Override default flag values for local packages and extra-deps