8.2.1: Ord TyCon is gone?

Benno Fünfstück benno.fuenfstueck at gmail.com
Sat Jul 29 13:07:53 UTC 2017


Hi,

Maybe you can use UniqFM for your map:
https://hackage.haskell.org/package/ghc-8.2.1/docs/UniqFM.html

Regards,
Benno

Hi Levent,
>
> that seems to be this commit, part of the making-ghc-deterministic effort:
>
>   https://ghc.haskell.org/trac/ghc/ticket/4012#comment:213
>
> CC @niteria who might be answer your question.
>
> Niklas
>
> On 29/07/17 08:12, Levent Erkok wrote:
> > I'm trying to port some plugin code from GHC 8.0.2 to GHC 8.2.1; alas
> > I'm getting an error suggesting that TyCon is no longer an instance of
> Ord:
> >
> > Data/SBV/Plugin/Analyze.hs:580:33: error:
> >     • No instance for (Ord TyCon) arising from a use of ‘M.lookup’
> >       There are instances for similar types:
> >         instance Ord GHC.Types.TyCon -- Defined in ‘GHC.Classes’
> >     • In the expression: k `M.lookup` tcMap
> >       In the expression:
> >         case k `M.lookup` tcMap of
> >           Just knd -> return knd
> >           Nothing -> unknown
> >       In a case alternative:
> >           Just k
> >             -> case k `M.lookup` tcMap of
> >                  Just knd -> return knd
> >                  Nothing -> unknown
> >     |
> > 580 |                  Just k -> case k `M.lookup` tcMap of
> >     |                                 ^^^^^^^^^^^^^^^^^^
> >
> > I was using TyCon's as a key in a map, but that code is no longer
> > compiling. I've looked through the release notes but couldn't find what
> > the new mechanism is.
> >
> > I'd appreciate if someone can point me in the right direction regarding
> > how to use TyCon as a map key..
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20170729/b51d114a/attachment.html>


More information about the ghc-devs mailing list