hi - hmake interactive
Hmake interactive, or hi for short, is an
interpreter-like environment that you can wrap over any common Haskell
compiler to achieve an interactive development style.
It deliberately looks and feels a lot like the Hugs
interpreter. The difference is that you get real compiled code,
compiled by your favorite compiler - you can even change compiler on
the fly, to check your code's portability!
Of course, one of the reasons people prefer Hugs over a compiler is
that Hugs generates runnable code very quickly compared to,
say, ghc. But all compilers are not equal - for instance,
nhc98 is pretty fast at generating code. On a
500Mhz Pentium, hi compiles an expression
typed at the command-line in about one second with nhc98.
And if you compare compile time with running time, nhc98's
compiled code runs between 3-15 times faster than Hugs,
so you can easily end up with a net gain.
An even bigger potential advantage of hi is that it uses a
smart recompilation strategy. Big programs are the ones on which you
would most like to use a compiler, for the benefit of speedy code.
However, in big projects, compile times are long, so you really
only want to recompile the modules you have edited and those which
depend on them. Writing Makefiles is tedious and error-prone, so
Hugs is often seen as an easier alternative. But because
hi is just an interface to the standard hmake,
you get the benefit of its recompilation analysis to rebuild only
what is necessary, so you can reduce compile-times significantly,
whilst still achieving full compiled-code speed, and what's more,
you also have the Hugs-like ability to test small expressions
at the command-line.
To use hmake interactive, just grab, build, and install
hmake, then type hi. The commands available
are described in hi-commands.html.
If you want to know a little bit more about hi, there are
two draft documents describing its implementation.
A literate script.
A draft paper.
There is also a web page describing the simple
line editor used in hi to allow you to edit expressions as
you type them.
The latest updates to this software are available on the WWW from
http://www.haskell.org/hmake/
(
http://www.cs.york.ac.uk/fp/hmake/)
Information last updated: 2002-01-15
York Functional Programming Group
Malcolm.Wallace@cs.york.ac.uk
|