Hs2lib: A Library and Preprocessor that makes it easier to create shared libs from Haskell programs.

[ bsd3, development, library, program ] [ Propose Tags ]

The supplied PreProcessor can be run over any existing source and would generate FFI code for every function marked to be exported by the special notation documented inside the package. It then proceeds to compile this generated code into a lib.

The Library contains some helper code that's commonly needed to convert between types, and contains the code for the typeclasses the PreProcessor uses in the generated code to keep things clean.

It will always generated the required C types for use when calling the dll, but it will also generate the C# unsafe code if requested.

Read http://www.scribd.com/doc/63918055/Hs2lib-Tutorial#scribd

A replacement for this library is in development and will eventually replace this

Current Restrictions:

  • Does NOT support x64 bit versions of GHC. This will be added in future versions if enough demand exist.

  • You cannot export functions which have the same name (even if they're in different modules because 1 big hsc file is generated at the moment, no conflict resolutions)

  • You cannot export datatypes with the same name, same restriction as above.

  • Does not support automatic instance generation for infix constructors yet

  • List of Lists are not supported (concat them first).

NOTE: Package is now working again, but I have fixed the version of haskell-src-exts to prevent it from breaking again.


[Last Documentation]

  • WinDll
    • Debug
      • WinDll.Debug.Alloc
      • WinDll.Debug.Exports
      • WinDll.Debug.Records
      • WinDll.Debug.Stack
    • Lib
      • WinDll.Lib.Converter
      • WinDll.Lib.InstancesTypes
      • WinDll.Lib.Native
      • WinDll.Lib.NativeMapping
      • WinDll.Lib.NativeMapping_Debug
      • WinDll.Lib.Tuples
      • WinDll.Lib.Tuples_Debug
    • Structs
      • WinDll.Structs.Types


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS] 0.4.8, 0.5.0, 0.5.1, 0.5.2, 0.5.5, 0.5.6, 0.5.7, 0.5.8, 0.6.0, 0.6.1, 0.6.3 (info)
Dependencies array (>=, base (>=4 && <5), cereal (>=, containers (>=, directory (>=, filepath (>=, ghc (>=7.8.3), ghc-paths (>=, haddock (>=2.7.2), haskell-src-exts (>=1.13.5 && <=, mtl (>=, old-locale (>=, process (>=, QuickCheck (>=, random (>=, syb (>=, time (>= [details]
License BSD-3-Clause
Author Tamar Christina <tamar (at) zhox.com>
Maintainer Tamar Christina <tamar (at) zhox.com>
Category Development
Home page http://blog.zhox.com/category/hs2lib/
Uploaded by TamarChristina at 2015-01-27T11:58:10Z
Reverse Dependencies 1 direct, 0 indirect [details]
Executables Hs2lib-testgen, Hs2lib-debug, Hs2lib
Downloads 9293 total (37 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2015-11-11 [all 2 reports]