plugins: Dynamic linking for Haskell and C objects

[ bsd3, library, system ] [ Propose Tags ]

Dynamic linking and runtime evaluation of Haskell, and C, including dependency chasing and package resolution.

Described in the paper: Plugging Haskell In,

[Skip to Readme]


  • System
    • System.Eval
      • System.Eval.Haskell
      • System.Eval.Utils
    • System.MkTemp
    • System.Plugins
      • System.Plugins.Consts
      • System.Plugins.Env
      • System.Plugins.Load
      • System.Plugins.LoadTypes
      • System.Plugins.Make
      • System.Plugins.Package
      • System.Plugins.PackageAPI
      • System.Plugins.Parser
      • System.Plugins.Process
      • System.Plugins.Utils


Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees


Versions [RSS] 1.0, 1.1, 1.2, 1.3, 1.3.1, 1.4.0, 1.4.1, 1.5.1,,,,,,,,,,,, 1.5.7, 1.6.0, 1.6.1, 1.6.2,
Dependencies array, base (>=4 && <4.3), Cabal (>=1.6), containers, directory, ghc (>=6.10), ghc-prim, haskell-src, process, random [details]
License BSD-3-Clause
Author Don Stewart 2004-2009
Maintainer Don Stewart <>
Revised Revision 1 made by AdamBergmark at 2015-10-05T20:54:14Z
Category System
Home page
Uploaded by DonaldStewart at 2009-03-15T20:19:35Z
Distributions NixOS:
Downloads 22240 total (63 in the last 30 days)
Rating 1.5 (votes: 4) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-12-01 [all 7 reports]

Readme for plugins-1.4.1

[back to package description]

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.

It provides an `eval' function, for generating new, well-typed, compiled
code from a Haskell source string.

It also provides a new variation of printf for Haskell-- a runtime
generated, dynamically-typed printf.

Read the documentation in doc/ for more.


        $ chmod +x Setup.lhs configure
        $ ./Setup.lhs configure --prefix=/usr/local
        $ ./Setup.lhs build
        $ ./Setup.lhs install



* Requires GHC >= 6.4
* Requires Cabal


* 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:

    darcs get

   To get hs-plugins to use HSX, use: 

        $ mv plugins.cabal.hsx plugins.cabal
        $ ./Setup.lhs configure --enable-hsx

   Make sure to install HSX first though :)


* 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

* 'plugs' requires a working readline library.

* 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.

* If you need to regenerate ./configure you need >= autoreconf-2.53

* The documentation relies on haddock, latex, dvips, tex2page:

        $ cd doc && make



Have a look in the testsuite/ directory for many examples of how to
arrange your code.


This library is distributed under the terms of the LGPL. The runtime
loader code is based on code written by Andr� Pang, and others, and is
distributed under the BSD-style Glasgow University license.


Requires GHC 6.4 or greater, though most testing has be done on 6.4.
The dynamic loader requires a functional GHCi implementation.

  Platform           |  Works   Should work*    Unknown    Won't work
i386-*-linux         |    X
i386-*-freebsd       |    X
i386-*-openbsd       |    X           
powerpc-apple-darwin |    X            
powerpc-*-linux      |    X            
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