clovyr / aeson-yaml

Encode any Aeson (JSON) value as YAML (in pure Haskell)
https://hackage.haskell.org/package/aeson-yaml
BSD 3-Clause "New" or "Revised" License
12 stars 7 forks source link

Compatibility with aeson-2.0 #16

Closed sjakobi closed 2 years ago

sjakobi commented 2 years ago

See https://hackage.haskell.org/package/aeson-2.0.0.0/changelog.

If I use --allow-newer to build aeson-yaml with aeson-2.0.0.0, I get this error:

src/Data/Aeson/Yaml.hs:92:59: error:
    • Couldn't match type ‘Data.Aeson.KeyMap.KeyMap Value’
                     with ‘HashMap.HashMap Text Value’
      Expected type: HashMap.HashMap Text Value
        Actual type: Object
    • In the first argument of ‘HashMap.toList’, namely ‘hm’
      In the second argument of ‘($)’, namely ‘HashMap.toList hm’
      In the second argument of ‘map’, namely
        ‘(sortOn fst $ HashMap.toList hm)’
   |
92 |         map (keyValue level) (sortOn fst $ HashMap.toList hm)
   |                                                           ^^
patrickmn commented 2 years ago

Uh oh. Thanks for fixing it! Will look at the quoting issue and issue a release hopefully tomorrow.

sjakobi commented 2 years ago

@patrickmn, I'd appreciate a release, no matter what the status of that quoting issue is. :)

patrickmn commented 2 years ago

Ack, really sorry this took so long, Simon. I had a dream about doing this!

Released aeson-yaml-1.1.0.1 now. (Not sure if that's the correct application of PvP in this case.)

sjakobi commented 2 years ago

Thank you, @patrickmn! And no worries! :)