8.2.1: Ord TyCon is gone?
erkokl at gmail.com
Sat Jul 29 17:44:39 UTC 2017
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..
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>
> >> 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.
> - Ben
> ghc-devs mailing list
> ghc-devs at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ghc-devs