Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration files so the project can be built with cabal #1667

Merged
merged 3 commits into from
Dec 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,16 @@ juvix compile --target wasm HelloWorld.juvix
wasmer HelloWorld.wasm
#+end_src

** Building the project with `cabal`

We recommend that contributors use the `stack` build tool with this project.

If you would prefer to use the `cabal` build tool instead then you must generate
the `juvix.cabal` file using [[https://github.com/sol/hpack][hpack]] before running `cabal build`.

To configure the Haskell LSP server to use `cabal` then replace `hie.yaml` with
`cabal.hie.yaml` in the root of the repostiory.

** The Juvix programming language

Juvix allows us to write programs with a high degree of assurance. The Juvix
Expand Down
10 changes: 10 additions & 0 deletions cabal.hie.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
cradle:
cabal:
- path: "./src"
component: "lib:juvix"

- path: "./app"
component: "exe:juvix"

- path: "./test"
component: "test:juvix-test"
17 changes: 17 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- Generated by stackage-to-hackage

with-compiler: ghc-9.2.5

packages:
./

jobs: $ncpus

allow-older: *
allow-newer: *

import: https://www.stackage.org/lts-20.2/cabal.config

package juvix
ghc-options: -optP-Wno-nonportable-include-path
test-show-details: direct
7 changes: 6 additions & 1 deletion package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ license-file: LICENSE
copyright: (c) 2022- Heliax AG.
maintainer: The PLT Team at Heliax AG <[email protected]>
author: [ Jonathan Prieto-Cubides , Jan Mas Rovira , Paul Cadman , Lukasz Czajka , Github's contributors ]
tested-with: ghc == 9.2.4
tested-with: ghc == 9.2.5
homepage: https://juvix.org
bug-reports: https://github.com/anoma/juvix/issues
description: The Juvix compiler
Expand All @@ -15,6 +15,11 @@ github: anoma/juvix
extra-source-files:
- README.org
- assets/*
- juvix-stdlib/**/*.juvix
- runtime/include/**/*.h
- runtime/**/*.a
- c-runtime/**/*.h
- c-runtime/walloc/walloc.c

dependencies:
- aeson == 2.0.*
Expand Down