[Haskell-cafe] Throwback of inferred types

Peter Verswyvelen bf3 at telenet.be
Sat Jan 19 13:11:13 EST 2008


The problem is that this only works when the complete source file compiles
correctly no?

I would find it most useful to get type inference information on the fly,
even when not all of the code compiles correctly yet.

> -----Original Message-----
> From: haskell-cafe-bounces at haskell.org [mailto:haskell-cafe-
> bounces at haskell.org] On Behalf Of gwern0 at gmail.com
> Sent: Saturday, January 19, 2008 6:42 PM
> To: Jon Harrop; haskell-cafe at haskell.org
> Subject: Re: [Haskell-cafe] Throwback of inferred types
> 
> On 2008.01.19 17:30:50 +0000, Jon Harrop <jon at ffconsultancy.com>
> scribbled 0.2K characters:
> >
> > Is it possible to get throwback of inferred types into Emacs or an
> IDE
> > for Haskell?
> >
> > --
> > Dr Jon D Harrop, Flying Frog Consultancy Ltd.
> 
> Sure. I once hacked together quite a while ago a little function for
> haskell-mode which looked like:
> 
> ,----
> | (defun getHaskellFunctionTypeSignature ()
> |   (interactive)
> |   (progn
> |     (setq file-name buffer-file-name)
> |     (setq functionName (thing-at-point 'word))
> |     (shell-command (concat "echo :t " functionName " | ghci -v0 -cpp
> | -fglasgow-exts -w " file-name "|grep " functionName) t)))
> | (global-set-key "\C-c\l" 'getHaskellFunctionTypeSignature)
> `----
> 
> And I think haskell-mode has a better way of doing things somewhere in
> its inf-haskell.el.
> 
> --
> gwern
> Information II captain SAS BRLO unclassified of Audiotel Taiwan RSOC



More information about the Haskell-Cafe mailing list