[Haskell-cafe] Throwback of inferred types
gwern0 at gmail.com
gwern0 at gmail.com
Sat Jan 19 12:42:22 EST 2008
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20080119/717223cb/attachment-0001.bin
More information about the Haskell-Cafe
mailing list