| |||||

| |||||

| |||||

Description | |||||

A Haskell interface to Mathematica's MathLink.
| |||||

Synopsis | |||||

| |||||

Basic usage | |||||

The following is a small Haskell module that exposes a function
callable from module Main where import Foreign.MathLink addTwo :: A function to be exposed to get method to receive a value from Mathematica, performs the desired
computation, and sends the result back to Mathematica via the put function.
The types that can be marshaled to/from See the | |||||

Known limitations | |||||

No out-of-band messaging | |||||

So, e.g., you cannot abort a calculation. An initial
implementation of this was working, but not always reliably, so it was
removed, to be added back in a coming revision, hopefully.
| |||||

needs rewrite rules
Expressible String | |||||

On Haskell systems without rewrite rules (or when they are not
used, as, e.g., is the case by default in GHC), the Expressible
instance for String is broken. To make sure that the rules always fire
with GHC, you can, for instance, include the OPTIONS_GHC -O pragma at
the top of your source file. Without using the rewrite rules, two simple
workarounds exist. Firstly, if you only need to marshal a single string,
you can use the getString and putString functions. More generally,
you can marshal the string as a value of type Expression by wrapping
it in the ExString constructor.
| |||||

Untested across platforms | |||||

The author developed the library on a 64-bit Linux platform with
GHC 6.10.1 and - any Haskell system with modest language extensions beyond the 98 standard and implementing the FFI addendum;
- any version of
*Mathematica*supporting version 3 of the*MathLink*interface; - any 32-bit or 64-bit OS.
Please report any failures in this regard, (or, better yet, send a patch!) and the author will make an effort (time, patience, and resources permitting) to bring the library closer to its stated goal, or at least to explicitly document the limitation in a future release. | |||||

module Foreign.MathLink.Types | |||||

module Foreign.MathLink.ML | |||||

module Foreign.MathLink.Expressible | |||||

Produced by Haddock version 2.3.0 |