Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

haskell-so-example

Example C program, showing to to call Haskell shared libraries. Also demonstrates how to build a dynamically- and statically-linked Haskell shared library.

Usage

$ make test
...
PASS

Dynamic

Entrée: A shared library with a pure Haskell centre, linked with dynamic Haskell libraries.

$ make dynamic-build
...
$ make dynamic-test
...
Testing dynamic flavour
  Simple test:    PASS
  Threaded test:  PASS

Static

Plat principal: A shared library with a pure Haskell centre, linked with static Haskell libraries.

$ make static-build
...
$ make static-test
...
Testing static flavour
  Simple test:    PASS
  Threaded test:  PASS

Note: On Linux, the static flavour requires rebuilding GHC packages as position-independent code.

About

Made by Miëtek Bak. Published under the BSD license.

Acknowledgements

Thanks to Albert Lai for an illuminating series of articles, including “Calling Haskell Shared Libraries from C”.

About

Exercise in dealing with Haskell shared libraries

Resources

License

Releases

No releases published

Packages

No packages published