<div dir="auto">That definitely sounds like a good approach to me!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 25, 2019, 5:04 PM Oliver Charles <<a href="mailto:ollie@ocharles.org.uk">ollie@ocharles.org.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I wonder if like TypeError we could have TypeWarning? Then you could<br>
have something like<br>
<br>
instance TypeWarning "Please use Fooble instead" => Show Foo where<br>
<br>
which would compile, but produce a warning whenever the `Show Foo`<br>
constraint was solved?<br>
<br>
On Mon, Nov 25, 2019 at 4:28 PM Andreas Abel <<a href="mailto:andreas.abel@ifi.lmu.de" target="_blank" rel="noreferrer">andreas.abel@ifi.lmu.de</a>> wrote:<br>
><br>
> Derailing...<br>
> Incidently, I recently asked for a "instance warning" feature in GHC:<br>
><br>
> <a href="https://gitlab.haskell.org/ghc/ghc/issues/17485" rel="noreferrer noreferrer" target="_blank">https://gitlab.haskell.org/ghc/ghc/issues/17485</a><br>
><br>
> (In my case I could go with a TypeError constraint instead.)<br>
><br>
> Maybe instance warnings could be a useful feature. It could be<br>
> implemented along the TypeError mechanism.<br>
><br>
> On 2019-11-24 18:35, Henning Thielemann wrote:<br>
> ><br>
> > On Sun, 24 Nov 2019, Dan Burton wrote:<br>
> ><br>
> >> We're talking about an instance in `base`, so if there's no other way,<br>
> >> it could at least be a flag akin to<br>
> >> -Wmissing-monadfail-instances that gets included in -Wcompat.<br>
> >> But relatedly: should there be a way to deprecate instances? I would<br>
> >> say yes.<br>
> ><br>
> > Sounds like another application of instance warnings that we already<br>
> > talked about:<br>
> > <a href="https://gitlab.haskell.org/ghc/ghc/issues/11796" rel="noreferrer noreferrer" target="_blank">https://gitlab.haskell.org/ghc/ghc/issues/11796</a><br>
> > _______________________________________________<br>
> > Libraries mailing list<br>
> > <a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a><br>
> > <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
> _______________________________________________<br>
> Libraries mailing list<br>
> <a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>