Proposal #79 "Add a :kind!! command to ghci" — propose yes

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-b... (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

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
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-b... (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@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee

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
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-b... (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@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
_______________________________________________ ghc-steering-committee mailing list ghc-steering-committee@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee -- Joachim Breitner mail@joachim-breitner.de http://www.joachim-breitner.de/

On Mar 21, 2018, at 2:25 PM, Joachim Breitner
wrote: How about we special case the syntax
:type _ :: Foo
I really liked this for a moment, but then I realized it doesn't work if you want to reduce a type that isn't of kind Type. But maybe you're onto something here. What about having the following set of options for :type: 1. +v means to print the type of the thing exactly as-is, without any funny business 2. +d means to default the type 3. +t means that you're asking for the type of a type, instead of the type of an expression 4. +f means to evaluate any type families 5. +s means to expand any type synonyms +v is incompatible with +d, +f, and +s. Otherwise, I think these mix nicely. :kind becomes a synonym for :type +t and :kind! becomes a synonym for :type +t +f. Note that users can define their own synonyms through :def. Richard

Like Richard
* I like the goal
* I hate the proposed command :kind!
I suppose we could add
:eval <expression>
as a way to evaluate <expression>; a long-form of
<expression>
and then
:eval type <type>
for this proposal.
Simon
| -----Original Message-----
| From: ghc-steering-committee

Ok, so it looks like we should bounce this back to the author to improve the syntax and address Richard’s comment. This what I will do unless I hear otherwise by the end of the week. Cheers, Manuel
Am 22.03.2018 um 23:26 schrieb Simon Peyton Jones
: Like Richard
* I like the goal * I hate the proposed command :kind!
I suppose we could add :eval <expression> as a way to evaluate <expression>; a long-form of <expression> and then :eval type <type> for this proposal.
Simon
| -----Original Message----- | From: ghc-steering-committee
On Behalf Of Manuel M T Chakravarty | Sent: 21 March 2018 02:43 | To: ghc-steering-committee@haskell.org | Subject: [ghc-steering-committee] Proposal #79 "Add a :kind!! command | to ghci" — propose yes | | We need to decide on the Proposal #79 ”Add a :kind!! command to ghci, | to expand type families and type synonyms”: | | (rendered) | https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithu | b.com%2Falpmestan%2Fghc-proposals%2Fblob%2Fmaster%2Fproposals%2F0000- | kind-bang- | bang.rst&data=04%7C01%7Csimonpj%40microsoft.com%7Cc5767d25630244346d5a | 08d58ed5770e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636571969830 | 865127%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJ | BTiI6Ik1haWwifQ%3D%3D%7C- | 1&sdata=TiBF9Hg1BxieAB2B6Naez9FWiX53Hhfg0BP%2B%2F3MKjHs%3D&reserved=0 | (discussion) | https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithu | b.com%2Fghc-proposals%2Fghc- | proposals%2Fpull%2F79&data=04%7C01%7Csimonpj%40microsoft.com%7Cc5767d2 | 5630244346d5a08d58ed5770e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7 | C636571969830865127%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIj | oiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C- | 1&sdata=VhEDSDfQQM19L3sY1yyuT5cHJ24jroBSdVg19DVWZiE%3D&reserved=0 | | 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@haskell.org | https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering- | committee
participants (4)
-
Joachim Breitner
-
Manuel M T Chakravarty
-
Richard Eisenberg
-
Simon Peyton Jones