eqType modulo associated types?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

eqType modulo associated types?

Conal Elliott
It looks to me like `eqType` accounts for type synonyms but not associated types. Is there a variant that compares modulo associated types, or perhaps a type normalizing operation to apply before `eqType`?

Thanks, - Conal

_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

Re: eqType modulo associated types?

Sebastian Graf
Hi Conal,

I've had success with `FamInstEnv.topNormaliseType` in the past. `eqType` doesn't take `FamInstEnvs`, so I'm pretty sure it can't look through family instances by itself.

Cheers,
Sebastian

Am Mo., 16. Sept. 2019 um 02:38 Uhr schrieb Conal Elliott <[hidden email]>:
It looks to me like `eqType` accounts for type synonyms but not associated types. Is there a variant that compares modulo associated types, or perhaps a type normalizing operation to apply before `eqType`?

Thanks, - Conal
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

RE: eqType modulo associated types?

GHC - devs mailing list
In reply to this post by Conal Elliott

Can you be more explicit?

 

I think you are referring to Type.eqType in GHC itself?

 

I think you might want to apply FamInstEnv.normaliseType first.

 

Simon

 

From: ghc-devs <[hidden email]> On Behalf Of Conal Elliott
Sent: 16 September 2019 02:38
To: [hidden email]
Subject: eqType modulo associated types?

 

It looks to me like `eqType` accounts for type synonyms but not associated types. Is there a variant that compares modulo associated types, or perhaps a type normalizing operation to apply before `eqType`?

 

Thanks, - Conal


_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

Re: eqType modulo associated types?

Conal Elliott
In reply to this post by Sebastian Graf
Thanks, Sebastian!  - Conal

On Mon, Sep 16, 2019 at 1:30 AM Sebastian Graf <[hidden email]> wrote:
Hi Conal,

I've had success with `FamInstEnv.topNormaliseType` in the past. `eqType` doesn't take `FamInstEnvs`, so I'm pretty sure it can't look through family instances by itself.

Cheers,
Sebastian

Am Mo., 16. Sept. 2019 um 02:38 Uhr schrieb Conal Elliott <[hidden email]>:
It looks to me like `eqType` accounts for type synonyms but not associated types. Is there a variant that compares modulo associated types, or perhaps a type normalizing operation to apply before `eqType`?

Thanks, - Conal
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs