<div dir="ltr">Yikes, this is going to break nearly everything.  Definitely good to let people know.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jun 20, 2021 at 7:43 AM Ben Gamari <<a href="mailto:ben@smart-cactus.org">ben@smart-cactus.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Harendra Kumar <<a href="mailto:harendra.kumar@gmail.com" target="_blank">harendra.kumar@gmail.com</a>> writes:<br>
<br>
> I see the following errors when compiling with ghc head version:<br>
><br>
> $ ghc-stage2 --version<br>
> The Glorious Glasgow Haskell Compilation System, version 9.3.20210608<br>
><br>
> $ cabal build --with-compiler ghc-stage2 --allow-newer<br>
><br>
> Data/Colour/CIE.hs:80:12: error:<br>
>     Ambiguous occurrence ‘sum’<br>
>     It could refer to<br>
>        either ‘Prelude.sum’,<br>
>               imported from ‘Prelude’ at Data/Colour/CIE.hs:25:8-22<br>
>               (and originally defined in ‘Data.Foldable’)<br>
>            or ‘Data.List.sum’,<br>
>               imported from ‘Data.List’ at Data/Colour/CIE.hs:41:1-16<br>
>               (and originally defined in ‘GHC.List’)<br>
>    |<br>
> 80 |    total = sum $ map fst l<br>
>    |            ^^^<br>
><br>
> Can someone briefly describe this change and what's the recommended way of<br>
> fixing this? Just hide the Data.List definition? I do not see this<br>
> mentioned in the release notes of 9.2/9.4 here:<br>
> <a href="https://ghc.gitlab.haskell.org/ghc/doc/users_guide/9.2.1-notes.html" rel="noreferrer" target="_blank">https://ghc.gitlab.haskell.org/ghc/doc/users_guide/9.2.1-notes.html</a><br>
><br>
Indeed, this is due to the monomorphic Data.List proposal, which the<br>
CLC decided would accompany the addition of Data.List.singleton. The<br>
correct fix here is to either qualify the import of `Data.List` or add<br>
an explicit import list. I'll try to remember to add a note about this<br>
to the release notes and migration guide.<br>
<br>
<br>
Cheers,<br>
<br>
- Ben<br>
<br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div>