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

build fails when lifting the limit on base < 15 #27

Open
andrewufrank opened this issue Jun 30, 2024 · 1 comment · May be fixed by #28
Open

build fails when lifting the limit on base < 15 #27

andrewufrank opened this issue Jun 30, 2024 · 1 comment · May be fixed by #28

Comments

@andrewufrank
Copy link

I wanted to try a conversion of ansible to dhall, but failed to install.
could you update the package to run with current ghc? base < 15 is low and when I lifted it I got an error

Main.hs:160:40: error: [GHC-83865]
    • Couldn't match type: Data.Aeson.KeyMap.KeyMap Value
                     with: HashMap k0 Value
      Expected: HashMap k0 Value
        Actual: Object
    • In the first argument of ‘HM.elems’, namely ‘v’
      In the expression: HM.elems v
      In the expression:
        case HM.elems v of
          [v']
            -> case v' of
                 Object obj -> do ...
                 _ -> empty
          _ -> empty
    |
160 |   parseJSON (Object v) = case HM.elems v of
    |                                        ^

I would also appreciate I if you could give an example how to use it with a compiled and installed version of the code...

Thank you
andrew

@TristanCacqueray TristanCacqueray linked a pull request Jun 30, 2024 that will close this issue
@TristanCacqueray
Copy link
Collaborator

Thank you for the bug report, the error is caused by the version 2 of the json library (aeson). This should be fixed by #28, I also fixed support for the latest ansible-doc. Here is what I ran to update the bindings:

# Update the binding:
ansible-collection-to-dhall$ cabal run ansible-collection-to-dhall -- --ansible_doc $(which ansible-doc) --builtin --output ../Ansible/
# Reformat and regen the packages:
dhall-ansible$ shake # or use `podman run -it --rm -v $(pwd):/data:Z quay.io/software-factory/shake-factory`

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 a pull request may close this issue.

2 participants