@hackage typalyze0.1.1

Analyzes Haskell source files for easy reference

typalyze


Analyzes a Haskell source file and collects useful information about
it, which is then output to stdout in a (hopefully) easy-to-parse
format.

The current incarnation just obtains information about types over
source-spans.  The output describes spans of text in files which GHC
considers to have the given type.  For example:

src/Main.hs:55:49-54
  forall a. a -> IO a

means that on line 55 of Main.hs, from column 49-54, whatever is in
that region is considered to have type "forall a. a -> IO a".

typalyze tries to be smart about packages and modules, and
automatically attempts to identify the GHC options which will allow
the file to be parsed and typechecked successfully.

However, if this fails, you can supply some options to the program to
help it along.  See the output of --help.

typalyze.el

Interacts with the typalyze program, which aides Haskell development.

C-c C-a C-c Analyze current buffer. C-c C-a C-t Show type of thing at point.

Also, typalyzes buffer whenever it is saved.

hswatch


Alternatively, an external program named 'hswatch' can take care of
updating typalyze, on file modification, in the background.  To get
this running in Emacs, type M-x hswatch and select the directory tree
you want it to keep watch over.

It requires 'inotify-tools' which only works on recent versions of the
Linux kernel, 2.6.13+.