1
1
mirror of https://github.com/anoma/juvix.git synced 2024-09-11 16:26:33 +03:00
juvix/stack.yaml

15 lines
438 B
YAML
Raw Normal View History

ghc-options:
"$locals": -optP-Wno-nonportable-include-path
resolver: nightly-2024-05-31
extra-deps:
Replace `polysemy` by `effectful` (#2663) The following benchmark compares juvix 0.6.0 with polysemy and a new version (implemented in this pr) which replaces polysemy by effectful. # Typecheck standard library without caching ``` hyperfine --warmup 2 --prepare 'juvix-polysemy clean' 'juvix-polysemy typecheck Stdlib/Prelude.juvix' 'juvix-effectful typecheck Stdlib/Prelude.juvix' Benchmark 1: juvix-polysemy typecheck Stdlib/Prelude.juvix Time (mean ± σ): 3.924 s ± 0.143 s [User: 3.787 s, System: 0.084 s] Range (min … max): 3.649 s … 4.142 s 10 runs Benchmark 2: juvix-effectful typecheck Stdlib/Prelude.juvix Time (mean ± σ): 2.558 s ± 0.074 s [User: 2.430 s, System: 0.084 s] Range (min … max): 2.403 s … 2.646 s 10 runs Summary juvix-effectful typecheck Stdlib/Prelude.juvix ran 1.53 ± 0.07 times faster than juvix-polysemy typecheck Stdlib/Prelude.juvix ``` # Typecheck standard library with caching ``` hyperfine --warmup 1 'juvix-effectful typecheck Stdlib/Prelude.juvix' 'juvix-polysemy typecheck Stdlib/Prelude.juvix' --min-runs 20 Benchmark 1: juvix-effectful typecheck Stdlib/Prelude.juvix Time (mean ± σ): 1.194 s ± 0.068 s [User: 0.979 s, System: 0.211 s] Range (min … max): 1.113 s … 1.307 s 20 runs Benchmark 2: juvix-polysemy typecheck Stdlib/Prelude.juvix Time (mean ± σ): 1.237 s ± 0.083 s [User: 0.997 s, System: 0.231 s] Range (min … max): 1.061 s … 1.476 s 20 runs Summary juvix-effectful typecheck Stdlib/Prelude.juvix ran 1.04 ± 0.09 times faster than juvix-polysemy typecheck Stdlib/Prelude.juvix ```
2024-03-21 15:09:34 +03:00
- git: https://github.com/haskell-effectful/effectful.git
commit: 2037be9a4f4e8f8fd280d9359b1bc7feff9b29b9
subdirs:
- effectful-th
upgrade to Ghc 9.8.1 (#2624) This PR updates the stackage LTS resolver to `nightly-2024-02-06` which uses GHC 9.8.1 ## Upgrade notes You will need to update your HLS to [2.6.0.0](https://github.com/haskell/haskell-language-server/releases/tag/2.6.0.0), this release contains support for GHC 9.8.1 ## Fixes ### `haskeline` / `repline` We have removed the custom haskeline / repline forks used in the build. This is because we had trouble overriding haskeline as it is bundled with GHC and the stackage resolver uses this bundled version. We were using a custom fork of haskeline to implement [mapInputT_](https://github.com/anoma/juvix/blob/15c0685c911a7ce3d2ee8c1597a1e6dd96e707bf/app/Commands/Repl.hs#L409) in the Juvix REPL, required to implement error handling. This requires private API from the Haskeline library. Instead of using a custom fork we use TemplateHaskell to obtain access to the private API we need. See [DarkArts.hs](https://github.com/anoma/juvix/blob/15c0685c911a7ce3d2ee8c1597a1e6dd96e707bf/src/Juvix/Prelude/DarkArts.hs) and [HaskelineJB.hs](https://github.com/anoma/juvix/blob/15c0685c911a7ce3d2ee8c1597a1e6dd96e707bf/app/HaskelineJH.hs). To obtain access to the private API, we adapted a method from [a Tweag blogpost](https://www.tweag.io/blog/2021-01-07-haskell-dark-arts-part-i/) and [repo](https://github.com/tweag/th-jailbreak) - updating it for GHC 9.8.1. ### `aeson-better-errors` The `aeson-better-errors` library has not been updated to work with `mtl-2.3.0` so it cannot work with the new stackage resolver. We are using a [fork](https://github.com/Vekhir/aeson-better-errors.git) which has been updated. We should consider replacing this library in future, see https://github.com/anoma/juvix/issues/2621 ### `path` The `path` library now includes API `splitDrive` and `dropDrive` so we can remove our versions of those functions from the prelude. ### `with-utf8` We no longer need to depend on `with-utf8`. We were using this package for UTF-8 versions of `readFile` and `writeFile` APIs. These APIs are now available in the `text` package. ### Compiler warnings GHC 9.8.1 introduces several new compiler warnings. * We have suppressed `missing-role-annotations` and `missing-poly-kind-signatures` * We added our own versions of `head` and `tail` to work around the new `partial-tx` warning introduced for those functions in `Data.List`. * We fixed up the code to avoid the [term-variable-capture](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/using-warnings.html#ghc-flag--Wterm-variable-capture) warning.
2024-02-07 12:47:48 +03:00
- git: https://github.com/Vekhir/aeson-better-errors.git
commit: 1ec49ab7d1472046b680b5a64ae2930515b47714
Update stackage resolver to LTS 21.6 (#2275) Stack LTS 21.6 uses GHC 9.4.5, binaries for HLS are available via ghcup. Changes required: 1. Fix warnings about type level `:` and `[]` used without backticks. 2. Fix warnings about deprecation of builtin `~` - replaced with `import Data.Type.Equality ( type (~) )` in the Prelude 3. SemVer is no longer a monoid 4. `path-io` now contains the `AnyPath` instances we were defining (thanks to Jan) so they can be removed. 5. Added `aeson-better-errors-0.9.1.1` as an extra-dep. The reason it is not part of the resolver is only because it has a strict bound on base which is not compatible with ghc 9.4.5. To work around this I've set: ``` allow-newer: true allow-newer-deps: - aeson-better-errors ``` which relaxed the upper constraint bounds for `aeson-better-errors` only. When the base constraints have been updated we can remove this workaround. 6. Use stack2cabal to generate the cabal.project file and to freeze dependency versions. https://www.stackage.org/lts-21.6/cabal.config now contains the constraint `haskeline installed`, which means that the version of haskeline that is globally installed with GHC 9.4.5 will be used, see: * https://github.com/commercialhaskell/stackage/issues/7002 GHC 9.4.5 comes with haskeline 0.8.2 preinstalled but our configuration contains the source-repository-package for haskeline 0.8.2.1 (required because we're using a fork) so if you try to run` cabal build` you get a conflict. Constraints from cabal imports cannot yet be overridden so it's not possible to get rid of this conflict using the import method. So we need to use stack2cabal with an explicit freeze file instead. 7. Remove `runTempFilePure` as this is unused and depends on `Polysemy.Fresh` in `polysemy-zoo` which is not available in the resolver. It turns out that it's not possible to use the `Fresh` effect in a pure context anyway, so it was not possible to use `runTempFilePure` for its original purpose. 8. We now use https://github.com/benz0li/ghc-musl as the base container for static linux builds, this means we don't need to maintain our own Docker container for this purpose. 9. The PR for the nightly builds is ready https://github.com/anoma/juvix-nightly-builds/pull/2, it should be merged as soon as this PR is merged. Thanks to @benz0li for maintaining https://github.com/benz0li/ghc-musl and (along with @TravisCardwell) for help with building the static binary. * Closes https://github.com/anoma/juvix/issues/2166
2023-08-11 12:49:33 +03:00
allow-newer: true
allow-newer-deps:
- aeson-better-errors
Replace `polysemy` by `effectful` (#2663) The following benchmark compares juvix 0.6.0 with polysemy and a new version (implemented in this pr) which replaces polysemy by effectful. # Typecheck standard library without caching ``` hyperfine --warmup 2 --prepare 'juvix-polysemy clean' 'juvix-polysemy typecheck Stdlib/Prelude.juvix' 'juvix-effectful typecheck Stdlib/Prelude.juvix' Benchmark 1: juvix-polysemy typecheck Stdlib/Prelude.juvix Time (mean ± σ): 3.924 s ± 0.143 s [User: 3.787 s, System: 0.084 s] Range (min … max): 3.649 s … 4.142 s 10 runs Benchmark 2: juvix-effectful typecheck Stdlib/Prelude.juvix Time (mean ± σ): 2.558 s ± 0.074 s [User: 2.430 s, System: 0.084 s] Range (min … max): 2.403 s … 2.646 s 10 runs Summary juvix-effectful typecheck Stdlib/Prelude.juvix ran 1.53 ± 0.07 times faster than juvix-polysemy typecheck Stdlib/Prelude.juvix ``` # Typecheck standard library with caching ``` hyperfine --warmup 1 'juvix-effectful typecheck Stdlib/Prelude.juvix' 'juvix-polysemy typecheck Stdlib/Prelude.juvix' --min-runs 20 Benchmark 1: juvix-effectful typecheck Stdlib/Prelude.juvix Time (mean ± σ): 1.194 s ± 0.068 s [User: 0.979 s, System: 0.211 s] Range (min … max): 1.113 s … 1.307 s 20 runs Benchmark 2: juvix-polysemy typecheck Stdlib/Prelude.juvix Time (mean ± σ): 1.237 s ± 0.083 s [User: 0.997 s, System: 0.231 s] Range (min … max): 1.061 s … 1.476 s 20 runs Summary juvix-effectful typecheck Stdlib/Prelude.juvix ran 1.04 ± 0.09 times faster than juvix-polysemy typecheck Stdlib/Prelude.juvix ```
2024-03-21 15:09:34 +03:00
- effectful-th