:info in ghci
Hal Daume III
Tue, 3 Dec 2002 08:51:12 -0800 (PST)
I see your point. Though, I wouldn't be averse it it printing fixity for
everything. From my point of view, when I do :info on something, I want
as much information as possible.
...speaking of which :), would you consider printing the entire datatype
when :info is done on a constructor? For instance ':info Nothing'
currently just prints:
-- Nothing is a data constructor
Nothing :: forall a. Maybe a
but this really isn't any more information than I get out of ':t
Nothing'. It might be nice if it also printed the results of ':info
Maybe', so I could see the other constructors. I've run into this many
times, most recently when using hSeek, I had code that used hSeek with
AbsoluteSeek, and I wanted SeekFromEnd...in order to find this out, I had
to either look in the docs (slow), or do two :infos, first on AbsoluteSeek
and then on SeekMode...
I'm sure opinions differ on this, though...
Hal Daume III
"Computer science is no more about computers | firstname.lastname@example.org
than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume
On Tue, 3 Dec 2002, Simon Marlow wrote:
> > Ah...but if the fixity is not explicitly specified (and thus
> > defaults to
> > infixl 9), this isn't printed, which is what was catching
> > me...it seems it
> > should be (or perhaps say "infixl 9 (default)")?
> But every variable has a fixity, including normal identifiers... should
> we report the default fixity for those too?