[Haskell-cafe] Bikeshedding request for GHCi's :type
eric at seidel.io
Mon May 2 20:36:53 UTC 2016
On Mon, May 2, 2016, at 13:10, Richard Eisenberg wrote:
> So, what shall we name the two new commands?
> 1. A new command that specializes a type. (Currently with one
> specialization, but perhaps more examples in the future.)
> 2. A new command that preserves specialized type variables so that users
> of TypeApplications know what type parameters to pass in next.
> I have suggested :type-def for (1) and :type-spec for (2). I don't
> strongly like either. :examples and :inst have been suggested for (1).
> Any other ideas?
This might be overly pedantic of me, but :type-def seems way too similar
to typedef, which means something entirely different in common parlance
(even though we don't use that word in Haskell-land). We should at least
call it :type-default; GHCi should be able to disambiguate the shorter
Also, I'd suggest making (1) and (2) optional flags for :type rather
than new top-level commands. The shared prefix already suggests a common
purpose, printing out the type of something, so why not make it even
clearer that (1) and (2) are just specializations (heh) of :type?
More information about the Haskell-Cafe