hs-dotnet

Pragmatic .NET interop for Haskell

Latest on Hackage:0.4.0

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD3 licensed and maintained by Sigbjorn Finne
== hs-dotnet: a pragmatic Haskell .NET interop layer ==

This is the README for hs-dotnet, a package that lets you access
and use .NET code / classes from Haskell (and vice versa..)
Feel the power!

=== Web page ===

More info on the package, releases, etc can be found at

http://haskell.forkIO.com/dotnet


=== Getting started ===

After having built _and_ installed the Cabal package, you're ready to
go. Have a look in the examples/ directory for some bare-bones
examples

== Generating class wrappers ==

While it is possible to access .NET without taking such a structured
approach, you may choose to generate Haskell wrapper modules for the
.NET-side classes you want to access. Writing these out by hand, and
in a manner that's type-safe, gets tiresome after a while and unncessarily
exposes you to RSI risks, so a tool is provided for this in... tools/

Simply name the class you want to wrap up, possibly along with the -d
flag, and it generates a Haskell module for the class. The tool has
a couple of shortcomings and limitations at the moment, but in most
cases that should give you a workable Haskell module.

Improvements to wrapper generation is still evolving and expanded to
make the interface to the .NET world more natural to the Haskell
programmer.

=== Installation ===

Installation amounts to building and installing the Cabal package.

Notice that you will have to perform the install step before you are
able to use the package. The reason being that the supporting .NET
assembly (and accompanying COM classes) needs to be installed(GACed)
and published first.

You may manually do this step by running 'gacInstaller' on HsInvoker.dll
and 'regasm' on same.

Changes

Version 0.4.0 - released 2009-04-18

* New major release, interop layer completely rewritten, fixed and extended
in many ways. Under the hood, dropped the use of C++/CIL in preference
for C#. This will stand us in much better stead when integrating the
interop layer with Mono, something that hasn't been done yet due (in
part) to the COM interop driven way that hs-dotnet activates and
calls out to a .NET runtime.

* Much better tool support for generating Haskell module wrappers
(tools/hswrap)

* Good support for working with generic .NET types and representing
them using parametric polymorphism (+ type classes.)

* Transparent wrapping up of Haskell function values as System.Func
objects.

* Haskell delegate implementation reworked and improved, correctly
using P/Invoke marshalling layer to unwrap .NET objects before
passing them to the underlying Haskell function closure.

* Speedups and more code sharing. It's a dynamic, multi-layered (how
many I don't really want to think about at times.. ;-) ) interop
bridge though -- the looser coupling between the two environments
requires that -- so set your perf. expectations accordingly.

* More examples included, including how to use the wondrous LINQ via
hs-dotnet.

Version 0.3.1 - released 2009-01-15

* Fix .cabal issue wrt. base libraries.

Version 0.3.0 - released 2009-01-14

* First public release out the door.

Depends on:
Used by 1 package:
comments powered byDisqus