Holes in GHC

AntC anthony_clayden at clear.net.nz
Thu Jan 26 22:52:22 CET 2012

Thijs Alkemade <thijsalkemade <at> gmail.com> writes:

> On Thu, Jan 26, 2012 at 8:33 PM, Simon Peyton-Jones
> <simonpj <at> microsoft.com> wrote:
> >
> > I'm sorry to be slow, but I still don't understand what you intend. 

Hi Thijs, like Simon, I'm struggling to see the point. You said earlier:

> The intended users are people new to Haskell or people working with existing 
> code they are not familiar with.

I would expect newbies to at least work through some tutorials or 'try Haskeel 
on-line' before being let loose at the GHCi prompt.

> The primary goal is to make this part of GHCi. Say, you're working on
> a file Foo.hs in your favorite editor, and you have:
> ---
> foo = foldr __ 0 [1..5]
> ---
> And you have no idea what you should use at the location of the "__".
> You bring up GHCi, and load it as a module:

I would do:
   > :t foldr
   > :t \__f -> foldr __f 0 [1..5]

If the user doesn't know why asking for the type of a term would help, or 
can't figure out which sub-term they need to worry about, or doesn't 
understand the type they get back, I don't see that any fancy extension to 
GHCi is going to help much.


More information about the Glasgow-haskell-users mailing list