8.2.1: Ord TyCon is gone?
Ben Gamari
ben at smart-cactus.org
Sat Jul 29 14:07:37 UTC 2017
Levent Erkok <erkokl at gmail.com> writes:
> 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
> | ^^^^^^^^^^^^^^^^^^
>
Hmm. I am unable to reproduce this,
$ ghci
λ> import Type.Reflection
λ> let tc = typeRepTyCon (typeRep @Int)
λ> tc == tc
True
Does that work for you?
Cheers,
- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20170729/56189e26/attachment.sig>
More information about the ghc-devs
mailing list