fosskers / microlens-aeson

Lenses and Traversals for Aeson, based on Microlens.
MIT License
14 stars 6 forks source link

building on ghc-7.8 #2

Closed juhp closed 5 years ago

juhp commented 5 years ago

Just a small wish, but any chance of getting microlens-aeson-2.1 to build on ghc-7.8?

[1 of 2] Compiling Lens.Micro.Aeson.Internal ( src/Lens/Micro/Aeson/Internal.hs, dist/build/Lens/Micro/Aeson/Internal.o )
src/Lens/Micro/Aeson/Internal.hs:33:30: Not in scope: ‘<$>’
src/Lens/Micro/Aeson/Internal.hs:34:23: Not in scope: ‘pure’
src/Lens/Micro/Aeson/Internal.hs:44:47: Not in scope: ‘<$>’
src/Lens/Micro/Aeson/Internal.hs:45:16: Not in scope: ‘pure’
src/Lens/Micro/Aeson/Internal.hs:55:58: Not in scope: ‘<$>’
src/Lens/Micro/Aeson/Internal.hs:56:19: Not in scope: ‘pure’

No is also okay, but if above is all then it could be quite easy. Otherwise some upperbound (revision) should probably be added.

fosskers commented 5 years ago

Reasonable! Lemme see what I can do about this.

fosskers commented 5 years ago

Why 2.1? Would a patched 2.3 work just as well for you?

fosskers commented 5 years ago

Strangely, this test fails with GHC 7.8 (or rather, with LTS 2.22):

    , testCase "" $ ("42" ^? _Integer) @?= Just 42
fosskers commented 5 years ago

It as to do with the json parser from aeson, which I use. lts-2.22 provides aeson-0.8.1, while in 0.9.x, the meaning of the json parser was changed.

fosskers commented 5 years ago

Alright, got everything passing! @juhp if you can sign off on #3, then I'll release a new version to Hackage.

juhp commented 5 years ago

Yes thank you - newer version is even better I guess.

fosskers commented 5 years ago

Here you go: https://hackage.haskell.org/package/microlens-aeson-2.3.0.1