2005-04-24 08:51:33 +00:00
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------
|
|
|
|
|
hs-plugins
|
|
|
|
|
------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Compiler and tool support for compiling and loading, and evaluating
|
|
|
|
|
Haskell at runtime.
|
|
|
|
|
|
|
|
|
|
The library provides a convenient interface to GHC's runtime loader
|
|
|
|
|
and linker, letting you load compiled Haskell code.
|
|
|
|
|
|
|
|
|
|
It also provides a `make' system for compiling plugin source
|
|
|
|
|
automagically and for combining the user's .hs file with a stub of
|
|
|
|
|
standard declarations and syntax, saving the user from having to write
|
|
|
|
|
standard code themselves.
|
|
|
|
|
|
2005-12-25 23:44:04 +00:00
|
|
|
|
It provides an `eval' function, for generating new, well-typed, compiled
|
|
|
|
|
code from a Haskell source string.
|
2005-04-24 08:51:33 +00:00
|
|
|
|
|
|
|
|
|
It also provides a new variation of printf for Haskell-- a runtime
|
|
|
|
|
generated, dynamically-typed printf.
|
|
|
|
|
|
|
|
|
|
Read the documentation in doc/ for more.
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------
|
2005-08-19 01:43:17 +00:00
|
|
|
|
|
|
|
|
|
BUILDING:
|
2005-12-02 04:58:51 +00:00
|
|
|
|
$ chmod +x Setup.lhs configure
|
2005-12-04 00:43:39 +00:00
|
|
|
|
$ ./Setup.lhs configure --prefix=/usr/local
|
|
|
|
|
$ ./Setup.lhs build
|
|
|
|
|
$ ./Setup.lhs install
|
2005-08-19 01:43:17 +00:00
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------
|
|
|
|
|
|
2005-04-24 08:51:33 +00:00
|
|
|
|
DEPENDENCIES:
|
|
|
|
|
|
2005-07-09 01:52:52 +00:00
|
|
|
|
* Requires GHC >= 6.4
|
2005-08-19 01:43:17 +00:00
|
|
|
|
* Requires Cabal
|
2005-05-13 11:24:51 +00:00
|
|
|
|
|
2005-05-14 04:04:32 +00:00
|
|
|
|
------------------------------------------------------------------------
|
|
|
|
|
|
2005-08-19 01:43:17 +00:00
|
|
|
|
* Optional:
|
|
|
|
|
If you are doing a lot of `merge'-related operations, and require
|
|
|
|
|
an extended haskell parser, you can compile hs-plugins to use
|
|
|
|
|
HSX, Niklas Broberg's Haskell parser library, available at:
|
2005-04-24 08:51:33 +00:00
|
|
|
|
|
2005-08-19 01:43:17 +00:00
|
|
|
|
darcs get http://www.cs.chalmers.se/~d00nibro/haskell-src-exts
|
2005-04-24 08:51:33 +00:00
|
|
|
|
|
2005-09-03 03:37:37 +00:00
|
|
|
|
To get hs-plugins to use HSX, use:
|
|
|
|
|
|
2005-09-03 04:47:03 +00:00
|
|
|
|
$ mv plugins.cabal.hsx plugins.cabal
|
2005-12-02 04:58:51 +00:00
|
|
|
|
$ ./Setup.lhs configure --enable-hsx
|
2005-09-03 03:37:37 +00:00
|
|
|
|
|
2005-08-19 01:43:17 +00:00
|
|
|
|
Make sure to install HSX first though :)
|
2005-04-24 08:51:33 +00:00
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------
|
|
|
|
|
|
2005-05-21 04:06:05 +00:00
|
|
|
|
* On cygwin/windows you (a) make sure the cygwin "find" is before the
|
|
|
|
|
windows "find" on your PATH, and (b) to give the windows-style path
|
|
|
|
|
(e.g., "c:/cygwin/usr/local") in the ./configure --prefix=foo/bar
|
|
|
|
|
step
|
2005-05-21 02:36:05 +00:00
|
|
|
|
|
2005-08-19 01:43:17 +00:00
|
|
|
|
* 'plugs' requires a working readline library.
|
2005-04-24 08:51:33 +00:00
|
|
|
|
|
2005-08-19 01:43:17 +00:00
|
|
|
|
* If you wish to use TH in plugins, or to run load()-programs in GHCi,
|
|
|
|
|
you require a patch to GHC's linker, that was committed into ghc
|
|
|
|
|
6.3, and ghc 6.2 -stable branch, and is available from 6.2.2 onwards.
|
2005-04-24 08:51:33 +00:00
|
|
|
|
|
2005-08-19 01:43:17 +00:00
|
|
|
|
* If you need to regenerate ./configure you need >= autoreconf-2.53
|
2005-04-24 08:51:33 +00:00
|
|
|
|
|
2005-12-25 23:44:04 +00:00
|
|
|
|
* The documentation relies on haddock, latex, dvips, tex2page:
|
2005-04-24 08:51:33 +00:00
|
|
|
|
|
|
|
|
|
$ cd doc && make
|
|
|
|
|
|
2005-08-19 01:43:17 +00:00
|
|
|
|
------------------------------------------------------------------------
|
|
|
|
|
|
2005-04-24 08:51:33 +00:00
|
|
|
|
EXAMPLES:
|
|
|
|
|
|
2005-09-03 04:45:40 +00:00
|
|
|
|
Have a look in the testsuite/ directory for many examples of how to
|
2005-04-24 08:51:33 +00:00
|
|
|
|
arrange your code.
|
|
|
|
|
|
|
|
|
|
LICENSE:
|
|
|
|
|
|
|
|
|
|
This library is distributed under the terms of the LGPL. The runtime
|
|
|
|
|
loader code is based on code written by Andr<64> Pang, and others, and is
|
|
|
|
|
distributed under the BSD-style Glasgow University license.
|
|
|
|
|
|
|
|
|
|
PORTABILITY:
|
|
|
|
|
|
2005-07-09 01:52:52 +00:00
|
|
|
|
Requires GHC 6.4 or greater, though most testing has be done on 6.4.
|
2005-09-01 02:49:43 +00:00
|
|
|
|
The dynamic loader requires a functional GHCi implementation.
|
2005-04-24 08:51:33 +00:00
|
|
|
|
|
|
|
|
|
---------------------+--------------------------------------------------
|
|
|
|
|
Platform | Works Should work* Unknown Won't work
|
|
|
|
|
---------------------+--------------------------------------------------
|
|
|
|
|
i386-*-linux | X
|
|
|
|
|
i386-*-freebsd | X
|
|
|
|
|
i386-*-openbsd | X
|
|
|
|
|
powerpc-apple-darwin | X
|
2005-07-09 01:52:52 +00:00
|
|
|
|
powerpc-*-linux | X
|
2005-04-24 08:51:33 +00:00
|
|
|
|
sparc-*-solaris2 | X
|
|
|
|
|
ia64-*-linux | #
|
|
|
|
|
i386-*-solaris2 | X
|
|
|
|
|
sparc-*-linux | X
|
|
|
|
|
sparc-*-openbsd | X
|
|
|
|
|
i386-*-netbsd | X
|
|
|
|
|
amd64-*-openbsd | X
|
|
|
|
|
mips64-sgi-irix | X
|
|
|
|
|
---------------------+--------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# .hi file parsing is currently broken
|