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

21 Commits

Author SHA1 Message Date
Paul Cadman
46ab163ca7
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 11:49:33 +02:00
Jan Mas Rovira
e944f85074
Add :def command to the repl (#2119)
This pr adds a new command, `:def` to the repl. This command expects a
single identifier that must be in scope and then prints its definition.
For constructors, the whole type definition is printed.

It also applies some refactors to the code for repl command.
1. Before there was a mega `where` block of definitions. I have hoisted
most of the definitions there to the top level. I feel like now it is
easier to navigate and read.
2. Use `ExceptT` instead of local `case` expressions for errors.
3. Use forks of `haskeline` and `repline`. These forks are necessary
because these libraries do not export the constructors `HaskelineT` and
`InputT` respectively, thus, making it impossible to catch errors in
their underlying monad.
2023-05-30 10:19:09 +02:00
Jonathan Cubides
d78a543c57
Bump to LTS Haskell 20.21 (ghc-9.2.7) (#2093)
This PR upgrades our Haskell configurations to compile with version
9.2.7. The checklist below can serve as a guide for similar future
updates:

- [x] Update Stack resolver in `stack.yaml`
- [x] Modify `tested-with` section in `package.yaml`
- [x] Build and push the new compiler docker image, see instructions
here
[docker/README.md](https://github.com/anoma/juvix/blob/main/docker/README.md):
`ghcr.io/paulcadman/ghc-alpine:9.2.7 container`.
- [x] Update Linux Github Action workflow in
`.github/workflows/linux-static-binary.yaml` and adjust
`docker/Dockerfile-ghc-alpine-9.2.7`
- [x] Revise GHC/Stack/Cabal versions in `.devcontainer/Dockerfile`
- [x] Refresh Cabal configuration in `cabal-project`
2023-05-15 12:06:18 +02:00
Paul Cadman
54d6c28127
Update stack resolver to lts-20.12 (#1873)
* Fixes https://github.com/anoma/juvix/issues/1811

This PR updates:
* The CI workflows to use GHC 9.2.6
* The stack resolver to LTS-20.12
* The cabal.project to point to stackage LTS-20.12
* The linux static build CI to use alpine GHC 9.2.6

NB: You may need to install GHC 9.2.6 and run `cabal update` before
trying the build with `cabal`.
2023-03-06 10:10:56 +01:00
Jonathan Cubides
ef310be94b
Update stack.yaml (#1734) 2023-01-18 10:23:14 +01:00
janmasrovira
2db738a76f
Upgrade stack snapshot to use ghc-9.2.5 (#1621)
* upgrade stack snapshot to use ghc-9.2.5

* use lts-20.2

* Update alpine GHC Dockerfile to 9.2.5

We also build the Juvix runtime before the stack build in the
linux-static-binary workflow file.

* Add some documentation on how to build and deploy the alpine GHC image

* Docker documentation clarification.

Co-authored-by: Paul Cadman <git@paulcadman.dev>
2022-12-02 10:04:56 +01:00
janmasrovira
963d48857a
Upgrade to ghc-9.2.4 (#1451) 2022-08-15 16:58:26 +02:00
janmasrovira
b43c16dadc
Upgrade to ghc-9.2.3 (#178)
* upgrade to ghc-9.2.3

* [ci] build with ghc 9.2.3

* Remove the gcc alises added by LLVM install

The GHC installer (initiated by stack in the test step) requires access
to GCC because it uses the GCC specific `--gc-sections` linker flag.

We remove the gcc -> clang symlink, our tests use the clang binary
directly and so do not require the symlink.

* Run GCC PATH fixup step on macOS only

* Fixes YAML quote marks

* Install GHC via stack setup before installing LLVM

Having both macOS LLVM and stock LLVM on the PATH causes the GHC
installation to fail.

Co-authored-by: Jonathan Cubides <jonathan.cubides@uib.no>
Co-authored-by: Paul Cadman <git@paulcadman.dev>
2022-06-20 12:53:31 +02:00
Jonathan Cubides
a4eb2124b2
Generic Errors and refactoring (#123)
* w.i.p adoption of generic error type

* harmonize

* Remove the use of Error effect for internal bugs

* add location information to expression atom list

* Add GenericError instance for PatternAtoms

* Remove Maybe GenericError occurrences

* [ci] fix draft job's condition

* minor changes

* [stack] macos support ghc-opts

* Fix reviewer's comments

* remove accidentally commited file

* refactor to avoid duplication

* fix

Co-authored-by: Jan Mas Rovira <janmasrovira@gmail.com>
2022-05-26 17:52:08 +02:00
janmasrovira
13ce663fe1
bump stackage version and remove allow-newer (#76)
* bump stackage version and remove allow-newer

* update ci

* [chore] Invalidate CI cache

Co-authored-by: Paul Cadman <git@paulcadman.dev>
2022-05-04 12:57:42 +02:00
Jonathan Prieto-Cubides
a224d94709 [ pre-commit ] Add support and hooks 2022-04-04 17:44:08 +02:00
Jonathan Prieto-Cubides
eaad611bbf [ CI ] Add Haskell Github Action with Stack test and ormolu check 2022-04-04 15:55:15 +02:00
Jonathan Prieto-Cubides
17a0577ee7 [ app ] add --version flag and fixed warnings and formatting 2022-03-25 00:52:30 +01:00
Jan Mas Rovira
9cfbf6adac [ghc] upgrade to ghc 9.2.2 2022-03-23 23:25:55 +01:00
Jan Mas Rovira
4d662f640d [stack] update resolver 2022-02-28 18:28:09 +01:00
Jan Mas Rovira
6265ee27ed [dependencies] update to ghc 9.0.2 2022-01-11 10:23:45 +01:00
Jan Mas Rovira
ebf89ef254 add polysemy dependency. Incompatible with Safe 2022-01-03 12:52:58 +01:00
Jan Mas Rovira
07f2eb6689 upgrade to ghc9, use hpack 2021-12-23 10:57:55 +01:00
Jonathan Prieto-Cubides
ae6f1ff027 [ MiniJuvix/Parsing ] restructuring Language 2021-11-21 23:07:02 +01:00
Jonathan Prieto-Cubides
3ac7ea6975 [ .cabal ] Fixed Haskell compilation, upgraded dependencies. 2021-10-26 14:49:51 +02:00
Jonathan Prieto-Cubides
48abde93b4 First commit, initial project template. 2021-09-26 18:59:51 +02:00