Salsa: A .NET Bridge for Haskell

[ .net, bsd3, foreign, library ] [ Propose Tags ] [ Report a vulnerability ]

Salsa is an experimental Haskell library and code generator that allows Haskell programs to host the .NET runtime and interact with .NET libraries. It uses type families extensively to provide a type-safe mapping of the .NET object model in the Haskell type system.


[Skip to Readme]

Modules

  • Foreign
    • Foreign.Salsa
      • Foreign.Salsa.Binding

Flags

Automatic Flags
NameDescriptionDefault
use_mono

use mono instead of .Net

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.1, 0.2.0.0, 0.2.0.1, 0.2.0.2
Dependencies base (>=4 && <5), bytestring, file-embed, Win32 [details]
Tested with ghc ==7.6.3
License BSD-3-Clause
Copyright (c) 2007-2014 Andrew Appleyard, Tim Matthews
Author Andrew Appleyard
Maintainer tim.matthews7@gmail.com
Category Foreign, .NET
Home page http://haskell.org/haskellwiki/Salsa
Source repo head: git clone https://github.com/tim-m89/Salsa
Uploaded by TimMatthews at 2014-09-06T23:43:36Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 3897 total (15 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 2016-10-25 [all 10 reports]

Readme for Salsa-0.2.0.2

[back to package description]
                      Salsa: a .NET bridge for Haskell
                     
  Salsa is an experimental Haskell library and code generator that allows
  Haskell programs to host the .NET runtime and interact with .NET libraries.
  It uses type families extensively to provide a type-safe mapping of the .NET
  object model in the Haskell type system.

What's in the package:

  * 'Foreign' contains the Haskell library 'Foreign.Salsa'.  

    This library provides the Haskell-side interface to Salsa, including:
    functions to load the .NET runtime into the process, functions for
    interacting with .NET classes and objects, and the required type-level
    machinery.  It works together with the Haskell modules created by the
    generator (see below) to provide access to .NET classes and their members.

  * 'Driver' contains the Salsa .NET driver assembly (Salsa.dll).

    The driver assembly contains .NET code that is loaded automatically by the
    Salsa library when the .NET runtime is loaded into the process.  It
    provides run-time code generation facilities for calling in and out of the
    .NET runtime from Haskell.  The assembly binary (Salsa.dll) is embedded in
    'Foreign\Salsa\Driver.hs' using the 'Embed.hs' utility program.

  * 'Generator' contains the Salsa binding generator.

    The generator is a C# program that creates Haskell modules from .NET
    metadata to provide type-safe access to the requested .NET classes and
    methods in .NET assembilies.
    
    Note: the generator requires .NET 3.5 because it uses the 'System.Linq'
          namespace.

  * 'Samples' contains a few Haskell programs that use Salsa.

    - Hello:   a basic console 'Hello World' program.

    - Weather: a console program that asynchronously downloads the Sydney
               weather forecast and displays it.

    - Conway:  a simulator for Conway's Game of Life with a Windows
               Presentation Foundation GUI.  (Requires .NET 3.0 or later.)

Requirements:

  * GHC 7.8
  
    Salsa makes use of extensions that have only been available since version
    7.8 of GHC.

  * Microsoft .NET Framework 3.5 / Mono

    Since the Generator requires .NET 3.5, any Salsa development also requires
    this version.  Executables produced with Salsa however will run with just
    .NET 2.0 (provided that only .NET 2.0 assemblies are used by the program).

    Salsa will not work with versions 1.0/1.1 of the .NET Framework

    Building with Mono and running Salsa executables on Mono works. Salsa
    will be built with Mono if not running on Windows or the flag 'use_mono'
    is used when building with Cabal. 

Building:

  First build the Salsa.dll driver assembly. (See the README file within the 'Driver
  directory).

  Then build an install the Salsa library using Cabal as usual:

    cabal install

Authors:

  Andrew Appleyard
  Tim Matthews