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

Support aeson >= 2.0 #69

Merged
merged 1 commit into from
Dec 14, 2021
Merged

Support aeson >= 2.0 #69

merged 1 commit into from
Dec 14, 2021

Conversation

jneira
Copy link
Contributor

@jneira jneira commented Dec 13, 2021

Thanks in advance @ennocramer

#if MIN_VERSION_aeson(2,0,0)
import qualified Data.Aeson.KeyMap as Map
#else
import qualified Data.Aeson.Parser as JSON ( json' )
Copy link
Contributor Author

@jneira jneira Dec 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am preserving this import although the compiler warns it is unused, maybe it was not reexported in some aeson version?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's from a bad merge between this PR and #70. The current status of the file shows Data.Aeson.KeyMap being imported twice: once as JSON (#70) and once as Map (#69). Also it looks like this PR erased the CPP in mine at the use site, so I'd expect there to be errors now for anyone trying to use aeson<2.0

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CPP at the use site is not necessary, as both Data.HashMap.Lazy and Data.Aeson.KeyMap are imported as Map now, so the call is Map.unionWith either way.

I'll merge @jneira 's followup PR now but will leave the Hackage release unchanged.

@ennocramer ennocramer merged commit d67f2e7 into ennocramer:master Dec 14, 2021
@ennocramer
Copy link
Owner

Very nice, thank you!

@jneira
Copy link
Contributor Author

jneira commented Dec 14, 2021

@ennocramer thank you for the fast response, could we get a hackage release with this change included?

it would include support for ghc-9.0.1 (#66) and we could include the floskell plugin in hls when installing from hackage

@ennocramer
Copy link
Owner

I’ll do a hackage release later today. I ran into an issue building the benchmarks with GHC-9.2.1 and want to see if I can fix that before releasing.

@wrengr
Copy link
Contributor

wrengr commented Dec 14, 2021

Also, please be sure to reconcile the conflicts between #69 and #70 before the release :)

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.

Support aeson >= 2.0
3 participants