[ghc-steering-committee] Proposal #79 "Add a :kind!! command to ghci" — propose yes

Joachim Breitner mail at joachim-breitner.de
Wed Mar 21 18:25:01 UTC 2018


Hi,

I agree with Richard that we can give some care to coming up with good
command names. Given that we have precedence of +v and +d flags for
:type, maybe we want the same for :kind.

:kind <type> gives the kind of a type, without evaluating it
:kind +tf <type> gives the kind of a type, evaluating type families
:kind +s  <type> gives the kind of a type, evaluating synonyms
:kind +tf +s is of course allowed.

But it is weird to call it :kind when the focus here is the type…

How about we special case the syntax

:type _ :: Foo

to work without having to set -fdefer-typed-holes, indicating “I don’t
care about the value; show me the type Foo”. We can then add additional
flags to :type to control the type evaluation behavior more precisely.

Cheers,
Joachim

Am Dienstag, den 20.03.2018, 22:53 -0400 schrieb Richard Eisenberg:
> I think this is useful, but I strongly dislike :kind!!.
> 
> Currently:
> 
> > :type <expr> gives the type of an expression, without evaluating it
> > :kind <type> gives the kind of a type, without evaluating it
> > <expr> evaluates an expression
> 
> Obviously, we can't have
> 
> > <type> evaluates a type
> 
> because that's terribly ambiguous.
> 
> On the thread, I proposed :eval-type, which got a less-than-lukewarm
> response. But I'll propose that here, regardless. Really, anything is
> better than :kind!! for me. (And I think we should remove :kind! too,
> and use a system like with have with :type +v and :type +d to have an
> evaluate-this-type command, with options.)
> 
> Richard
> 
> > On Mar 20, 2018, at 10:42 PM, Manuel M T Chakravarty <chak at justtesting.org> wrote:
> > 
> > We need to decide on the Proposal #79 ”Add a :kind!! command to ghci, to expand type families and type synonyms”:
> > 
> >  (rendered)   https://github.com/alpmestan/ghc-proposals/blob/master/proposals/0000-kind-bang-bang.rst
> >  (discussion) https://github.com/ghc-proposals/ghc-proposals/pull/79
> > 
> > I agree that this is useful functionality and it is a simple change to GHCi. There has been some discussion about the naming of this command, but TBH I didn’t find any of the alternatives more convincing than ”:kind!!”, so I’d suggest to stick with that. 
> > 
> > I favour accepting this proposal. Are there any dissenting opinions?
> > 
> > Cheers,
> > Manuel
> > 
> > _______________________________________________
> > ghc-steering-committee mailing list
> > ghc-steering-committee at haskell.org
> > https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
> 
> _______________________________________________
> ghc-steering-committee mailing list
> ghc-steering-committee at haskell.org
> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
-- 
Joachim Breitner
  mail at joachim-breitner.de
  http://www.joachim-breitner.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20180321/f67f000e/attachment.sig>


More information about the ghc-steering-committee mailing list