ChrisPenner / slick

Static site generator built on Shake configured in Haskell
BSD 3-Clause "New" or "Revised" License
204 stars 24 forks source link

Build error: Ambiguous occurrence ‘Error’ #10

Closed adamflott closed 4 years ago

adamflott commented 4 years ago

[ started to rebuild my personal site so you may see more of me in your issues/prs :) ]

While building with stack and resolver: nightly-2019-12-26. Using shake 0.18.4. Changing the line to Data.Aeson.Error fixes the build. I used the slick-template as of today (12/26/2019) as a starting point.

slick                            > /private/var/folders/xz/0dmhv6695cxgy4cj7z_c29xw001002/T/stack59539/slick-1.0.1.0/src/Slick/Utils.hs:37:3: error:
slick                            >     Ambiguous occurrence ‘Error’
slick                            >     It could refer to
slick                            >        either ‘Data.Aeson.Error’,
slick                            >               imported from ‘Data.Aeson’ at src/Slick/Utils.hs:12:1-17
slick                            >               (and originally defined in ‘aeson-1.4.6.0:Data.Aeson.Types.Internal’)
slick                            >            or ‘Development.Shake.Error’,
slick                            >               imported from ‘Development.Shake’ at src/Slick/Utils.hs:13:1-24
slick                            >               (and originally defined in ‘shake-0.18.4:Development.Shake.Internal.Options’)
slick                            >    |
slick                            > 37 |   Error   err -> fail $ "json conversion error:" ++ err
slick                            >    |   ^^^^^
ChrisPenner commented 4 years ago

Thanks for the tip! I ran into this myself a few days ago so I had a patch locked and loaded. If you add slick-1.0.1.1 to your extra-deps in stack.yaml it should fix itself up 👍 Please re-open if this doesn't work for you 😄