:info features

Remi Turk rturk at science.uva.nl
Wed Feb 11 17:25:17 EST 2009


On Tue, Feb 10, 2009 at 01:31:24PM +0000, Simon Marlow wrote:
> Remi Turk wrote:
>> On Sat, Feb 07, 2009 at 12:39:03AM -0500, Brandon S. Allbery KF8NH wrote:
>>> On 2009 Feb 5, at 5:49, Remi Turk wrote:
>>>> SPJ agreed with the idea itself, but suggested an alternative set 
>>>> of  commands:
>>>>
>>>>   :info Show        -- See class definition only
>>>>   :instances Show   -- See instances of Show
>>> (...)
>>>> However, it would make ":i" ambiguous, which is rather sad.
>>> :class Show -- unique prefix :cl, already many such collisions
>>> :instance Show
>>
>> That could work, but then how to get information about types as
>> opposed to classes? Its not in the above example, but "Show"
>> actually stands for an arbitrary typeclass _or type_.
>>
>> However, as igloo pointed out on the ticket, abbreviations don't
>> actually have to be unique:
>>
>>  "For example, :b means :break even though we also have :back, :browse and :browse!. " [1]
>>
>> That would personally lead me to prefer the :info/:instances
>> combo, with :i as an abbreviation of :info.
>
> My vote would be:
>
> :info class Show
> :info type Show
> :info instance Show
>
> where
>
> :info Show
>
> displays information about everything called "Show"
>
> I know that classes and types share the same namespace currently, but it  
> might not always be so.

Sounds good in principle, and has the advantage of being 100%
backward compatible, but ":i class Show" for the common case
(ahum, _my_ common case at least ;) still seems rather verbose,
so how to abbreviate that?

Remi


More information about the Glasgow-haskell-users mailing list