<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><span style="font-size: 19px;" class="">I think we can learn to write code for PolyKinds in time, but in my experience it is quite disruptive right now, and could sow FUD around the new consensus we are trying to build.</span><div class=""><span style="font-size: 19px;" class=""><br class=""></span></div><div class=""><span style="font-size: 19px;" class="">My inclination would be to revert to Haskell2010 as the default for GHC until we can build confidence around a configuration that we are confident won’t be disruptive.</span></div><div class=""><span style="font-size: 19px;" class=""><br class=""></span></div><div class=""><span style="font-size: 19px;" class="">At a minimum I would create ghc2022 = ghc2021 \  {PolyKinds} and make that the default for ghc-9.4.</span></div><div class=""><span style="font-size: 19px;" class=""><br class=""></span></div><div class=""><span style="font-size: 19px;" class="">What do y’all think?</span></div><div class=""><span style="font-size: 19px;" class=""><br class=""></span></div><div class=""><span style="font-size: 19px;" class=""><br class=""></span><div><br class=""><blockquote type="cite" class=""><div class="">On 5 Jul 2022, at 16:02, Richard Eisenberg <<a href="mailto:lists@richarde.dev" class="">lists@richarde.dev</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I find that surprising, and disappointing. I think of PolyKinds as largely innocuous, except in strange scenarios, which is why PolyKinds is included in GHC2021. If that is wrong, perhaps we should consider not including PolyKinds in GHC2023...<div class=""><br class=""></div><div class="">It would be interesting to learn more about what's going wrong.</div><div class=""><br class=""></div><div class="">Richard<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Jul 5, 2022, at 10:26 AM, Chris Dornan <<a href="mailto:chris@chrisdornan.com" class="">chris@chrisdornan.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="auto" class="">yup, i should have started there—all my recent troubles have come from PolyKinds!</div><div class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 5 Jul 2022 at 15:00, Richard Eisenberg <<a href="mailto:lists@richarde.dev" class="">lists@richarde.dev</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is PolyKinds, which generalizes the kind of D, meaning that satisfying the Typeable a superclass constraint of C also requires a Typeable k constraint, where (a :: k).<br class="">
<br class="">
Richard<br class="">
<br class="">
> On Jul 2, 2022, at 12:49 AM, Chris Dornan <<a href="mailto:chris@chrisdornan.com" target="_blank" class="">chris@chrisdornan.com</a>> wrote:<br class="">
> <br class="">
> Quick quiz: the below Haskell2010 ‘Phantoms' module (also in this Gist: <a href="https://gist.github.com/cdornan/f75cd8024434d998c87610cbb7fb6ab3" rel="noreferrer" target="_blank" class="">https://gist.github.com/cdornan/f75cd8024434d998c87610cbb7fb6ab3</a>) appears (for me on GHC 9.2.2 and 9.2.3) to not be a GHC2021 module, reporting this error under the latter configuration:<br class="">
> <br class="">
> Phantoms.hs:22:10: error:<br class="">
>    • Could not deduce (Typeable k)<br class="">
>        arising from the superclasses of an instance declaration<br class="">
>      from the context: (C a, Typeable a)<br class="">
>        bound by the instance declaration<br class="">
>        at Phantoms.hs:22:10-36<br class="">
>    • In the instance declaration for ‘S (D a)’<br class="">
>   |<br class="">
> 22 | instance (C a,Typeable a) => S (D a) where smethod = undefined<br class="">
>   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^<br class="">
> <br class="">
> Phantoms.hs:22:10: error:<br class="">
>    • Could not deduce (Typeable k)<br class="">
>        arising from the superclasses of an instance declaration<br class="">
>      from the context: (C a, Typeable a)<br class="">
>        bound by the instance declaration<br class="">
>        at Phantoms.hs:22:10-36<br class="">
>    • In the instance declaration for ‘S (D a)’<br class="">
>   |<br class="">
> 22 | instance (C a,Typeable a) => S (D a) where smethod = undefined<br class="">
> <br class="">
> The question is which language extension(s) are giving rise to these errors?<br class="">
> <br class="">
> The ‘Phantoms' module is this:<br class="">
> <br class="">
> {-# LANGUAGE DerivingVia #-}<br class="">
> <br class="">
> module Phantoms where<br class="">
> <br class="">
> import Data.Typeable<br class="">
> <br class="">
> <br class="">
> class C a where<br class="">
>  cmethod :: Proxy a -> ()<br class="">
> <br class="">
> class (Show a, Typeable a) => S a where<br class="">
>  smethod :: a -> Int<br class="">
> <br class="">
> <br class="">
> newtype UsingD a = UsingD { getUsingD :: a }<br class="">
> <br class="">
> <br class="">
> newtype D a = D { getD :: Int }<br class="">
>    deriving (Show) via UsingD (D a)<br class="">
> <br class="">
> <br class="">
> instance (C a,Typeable a) => S (D a) where smethod = undefined<br class="">
> <br class="">
> instance (C a,Typeable a) => Show (UsingD a) where showsPrec = undefined<br class="">
> <br class="">
> <br class="">
> instance (C a) => C (D a) where cmethod _ = undefined<br class="">
> <br class="">
> _______________________________________________<br class="">
> ghc-steering-committee mailing list<br class="">
> <a href="mailto:ghc-steering-committee@haskell.org" target="_blank" class="">ghc-steering-committee@haskell.org</a><br class="">
> <a href="https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee" rel="noreferrer" target="_blank" class="">https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee</a><br class="">
<br class="">
</blockquote></div></div>
</div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>