[ghc-steering-committee] #380 GHC2021: Current status

Simon Peyton Jones simonpj at microsoft.com
Fri Dec 4 12:09:20 UTC 2020


|  that. At least not without exposing Type in the prelude

I'm often annoyed by the need to import Data.Kind(Type).  Exposing Type from the Prelude might be just the right thing.

Simon

|  -----Original Message-----
|  From: ghc-steering-committee <ghc-steering-committee-
|  bounces at haskell.org> On Behalf Of Joachim Breitner
|  Sent: 04 December 2020 11:24
|  To: ghc-steering-committee at haskell.org
|  Subject: Re: [ghc-steering-committee] #380 GHC2021: Current status
|  
|  Hi,
|  
|  Am Freitag, den 04.12.2020, 11:07 +0000 schrieb Tom Harding:
|  > After all, the introduction of this extension won’t break any
|  existing
|  > code (because it won’t be enabled) and it’s probably best to steer
|  > people (very gently) away from * ~ Type.
|  >
|  > This decision obviously hinges on a couple of assumptions, and maybe
|  > this is a controversial opinion, but I don’t think it’s necessarily
|  a
|  > bad thing to include this, even though it disagrees with the
|  > Haskell2010 spec.
|  
|  I strongly disagree. The goal of GHC2021 is, in my book, _not_ to
|  change peoples behavior, and should only include uncontroversial,
|  harmless extensions. Note that we want this to be the _default_ mode
|  of GHC as well, so it may break existing non-cabalized scripts.
|  
|  So why getting people away from expecting and writing * may be a
|  laudible goal, I’d be rather hesitant to use _this_ tool to achieve
|  that. At least not without exposing Type in the prelude:
|  
|     Prelude> :set -XKindSignatures
|     Prelude> :k Maybe
|     Maybe :: * -> *
|     Prelude> :k Maybe :: * -> *
|     Maybe :: * -> * :: * -> *
|  
|     Prelude> :set -XNoStarIsType
|     Prelude> :k Maybe
|     Maybe :: Type -> Type
|     Prelude> :k Maybe :: Type -> Type
|  
|     <interactive>:1:10: error:
|         Not in scope: type constructor or class ‘Type’
|  
|     <interactive>:1:18: error:
|         Not in scope: type constructor or class ‘Type’
|  
|     I find this too much of a _change_ (rather than a bunch of harmless
|     opt-in extensions and corner case cleanups) to be eligible for
|  GHC2021.
|  
|  
|     I _could_ get behind a less drastic change, e.g. a -XStarCanBeType
|     where GHC would by default print things using Type, have Type in
|  scope
|     by default (or print it with Data.Kind.Type), but also accept * as
|  Type
|     so that there is a nicer transition period. More careful nudging,
|  less
|     throat-forcing of this change.
|  
|  
|     In any case, even if you think that GHC202x is the right tool to
|     facilitate this change, then I recommend to not do it with GHC2021.
|     Let's make GHC2021 smooth as butter for anyone, that it gets
|  actually
|     used with joy by most, and there is no community split because of
|  it!
|  
|     Then we may have a better stand to carefully make controversial
|  changes
|     with GHC2022.
|  
|     Cheers,
|     Joachim
|  
|     --
|     Joachim Breitner
|    mail at joachim-breitner.de
|  
|  https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.j
|  oachim-
|  breitner.de%2F&data=04%7C01%7Csimonpj%40microsoft.com%7C71fd2da218
|  274565766708d8984726bd%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C1%7C63
|  7426779203482378%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV
|  2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=al%2FPwBdOBMsmI
|  v%2F7hH3ce%2BdPCKa9K6e%2BMtfRs2vteaY%3D&reserved=0
|  
|  
|  _______________________________________________
|  ghc-steering-committee mailing list
|  ghc-steering-committee at haskell.org
|  https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail
|  .haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-steering-
|  committee&data=04%7C01%7Csimonpj%40microsoft.com%7C71fd2da21827456
|  5766708d8984726bd%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C1%7C6374267
|  79203482378%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMz
|  IiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=DvDb4rRCvnRN%2BcqM4E
|  QSIf8kSXNypMnD6PZANjCENQI%3D&reserved=0


More information about the ghc-steering-committee mailing list