8.2.1: Ord TyCon is gone?

Levent Erkok erkokl at gmail.com
Sat Jul 29 17:44:39 UTC 2017


Thanks!

Turns out I actually needed an `Ord` instance for `(TyCon, [TyCon])`, which
made using `UniqFM` rather difficult, but it wasn't hard to work around the
issue by using nonDetCmpUnique function from the `Unique` module. For a
side project, I think it's good enough..

Cheers,

-Levent.

On Sat, Jul 29, 2017 at 9:06 AM, Ben Gamari <ben at smart-cactus.org> wrote:

> Brandon Allbery <allbery.b at gmail.com> writes:
>
> > On Sat, Jul 29, 2017 at 10:07 AM, Ben Gamari <ben at smart-cactus.org>
> wrote:
> >
> >> Hmm. I am unable to reproduce this,
> >>
> >>     $ ghci
> >>     λ> import Type.Reflection
> >>     λ> let tc = typeRepTyCon (typeRep @Int)
> >>     λ> tc == tc
> >>     True
> >>
> >> Does that work for you?
> >>
> >
> > Maybe I'm missing something, but doesn't that only test Eq, not Ord?
> >
> Oh dear, I somehow understood that you were referring to Typeable's
> TyCon, not the ghc library's TyCon. Ignore my message.
>
> Indeed the TyCon Ord instance is gone to help enforce determinism within
> GHC. If you need a map use UniqFM.
>
> Cheers,
>
> - Ben
>
> _______________________________________________
> 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/237a7f6f/attachment-0001.html>


More information about the ghc-devs mailing list