Multiple instance pragmas

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

Multiple instance pragmas

Facundo Domínguez-3
Dear devs,

I have a program [1] which depends on the ability to specify some instances to be both overlappable and incoherent.

GHC so far, allows only one of the OVERLAPPABLE or INCOHERENT pragmas to be specified per instance. One can still have an overlappable and incoherent instance by using -XIncoherenInstances, but this extension is deprecated.

Is there any chance that a patch is accepted to allow multiple instance pragmas? And if not, what would the reason for this constraint?

Thanks,
Facundo


_______________________________________________
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: Multiple instance pragmas

Brandon Allbery
TBH I'd have expected INCOHERENT to cover OVERLAPPABLE, i.e. all bets are off and you've allowed anything including overlaps.

On Mon, Nov 25, 2019 at 11:26 AM Domínguez, Facundo <[hidden email]> wrote:
Dear devs,

I have a program [1] which depends on the ability to specify some instances to be both overlappable and incoherent.

GHC so far, allows only one of the OVERLAPPABLE or INCOHERENT pragmas to be specified per instance. One can still have an overlappable and incoherent instance by using -XIncoherenInstances, but this extension is deprecated.

Is there any chance that a patch is accepted to allow multiple instance pragmas? And if not, what would the reason for this constraint?

Thanks,
Facundo

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


--
brandon s allbery kf8nh

_______________________________________________
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: Multiple instance pragmas

Richard Eisenberg-5
I agree -- I think INCOHERENT essentially subsumes the others. Do you have a counter-example?

Richard

On Nov 25, 2019, at 4:28 PM, Brandon Allbery <[hidden email]> wrote:

TBH I'd have expected INCOHERENT to cover OVERLAPPABLE, i.e. all bets are off and you've allowed anything including overlaps.

On Mon, Nov 25, 2019 at 11:26 AM Domínguez, Facundo <[hidden email]> wrote:
Dear devs,

I have a program [1] which depends on the ability to specify some instances to be both overlappable and incoherent.

GHC so far, allows only one of the OVERLAPPABLE or INCOHERENT pragmas to be specified per instance. One can still have an overlappable and incoherent instance by using -XIncoherenInstances, but this extension is deprecated.

Is there any chance that a patch is accepted to allow multiple instance pragmas? And if not, what would the reason for this constraint?

Thanks,
Facundo

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


--
brandon s allbery kf8nh
_______________________________________________
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