[Haskell-cafe] Is there a way to find out the type inferred for a local function inside another function? :)

Lyndon Maydwell maydwell at gmail.com
Fri Apr 8 16:41:53 CEST 2011


Agda's concept of holes seems perfect for this. Does Haskell have
anything similar?

On Fri, Apr 8, 2011 at 9:50 PM, Kazu Yamamoto <kazu at iij.ad.jp> wrote:
> I made a mistake. Use M-t instead of C-cC-t.
>
>>> Currently what I do is declare a signature for helper, and then if it
>>> gets a type error try to figure out how to fix it.  It's usually not
>>> very hard, but it would be slick to have the signature filled in
>>> automatically.
>>
>> Try ghc-mod on Hackage if you are an Emacs user.
>>
>> If GHC can guess the signature of helper function, haskell-mode with
>> ghc-mod automatically hilights the function. Typing C-cC-t inserts the
>> guessed signature.
>>
>>       http://www.mew.org/~kazu/proj/ghc-mod/en/
>>
>> --Kazu
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



More information about the Haskell-Cafe mailing list