
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/