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

Eta support for dhall-json #1013

Merged
merged 35 commits into from
Jun 19, 2019
Merged

Conversation

jneira
Copy link
Collaborator

@jneira jneira commented Jun 18, 2019

After #989 and #993 the use of the yaml package is isolated in the lib modules Dhall.Yaml and Dhall.YamlToDhall so it is easier to add support for compilers that cant use the yamlpackage like eta or ghcjs.
With this one we would add support for eta, a fork of ghc that compiles to jvm bytecode.
Main changes:

  • Add conditional to cabal file and cpp conditions to the main modules for yaml to use a specific module for eta, Dhall.Yaml.Eta that replaces calls to the yamlpackage to ffi calls to the java lib jackson, one of the most popular ones in the java world.
  • Add the java files that contains the ffi calls
  • Mark buildable: False the subpackages that cant be built by eta for now

One effect of use the cabal file for cabal and etlas (the build tool for eta) is stack and cabal builds show those warnings:

Warning: Cabal file warning in D:\ws\eta\dhall\dhall-haskell\dhall-json\dhall-js
on.cabal@ 69:9:
         Unknown field: "maven-depends"

Warning: Cabal file warning in D:\ws\eta\dhall\dhall-haskell\dhall-json\dhall-js
on.cabal@ 74:9:
         Unknown field: "java-sources"

I've not found a way to avoid them other than use another file for etlas build (etlas.dhall). It would suppose duplicate most of the logic, though.

@Gabriella439 Gabriella439 merged commit 95dc3da into dhall-lang:master Jun 19, 2019
@Gabriella439
Copy link
Collaborator

@jneira: Thank you! Great work, as usual! 🙂

@jneira jneira deleted the eta-support branch July 22, 2019 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants