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

Kazu Yamamoto ( 山本和彦 ) kazu at iij.ad.jp
Fri Apr 8 15:48:09 CEST 2011


> 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



More information about the Haskell-Cafe mailing list