mathlink-0.1.0.1: Call Haskell from MathematicaSource codeContentsIndex
Foreign.MathLink.ML
Synopsis
runMathLink :: [Function] -> IO ()
runMathLinkWithArgs :: [String] -> [Function] -> IO ()
evaluate :: String -> ML Bool
evaluateString :: String -> ML Bool
getLink :: ML Link
throwOnError :: Integral a => a -> ML ()
boolToError :: Bool -> ML ()
getType :: ML Type
putFunctionHead :: String -> Int -> ML ()
getFunctionHead :: ML (String, Int)
putScalarWith :: (Link -> b -> IO CInt) -> (a -> b) -> a -> ML ()
getScalarWith :: Storable a => (Link -> Ptr a -> IO CInt) -> (a -> b) -> ML b
putStringWith :: (Link -> CString -> IO CInt) -> String -> ML ()
getStringWith :: (Link -> Ptr CString -> IO CInt) -> (Link -> CString -> IO ()) -> ML String
withLink0 :: (Link -> IO a) -> ML a
withLink1 :: (Link -> a -> IO b) -> a -> ML b
withLink2 :: (Link -> a -> b -> IO c) -> a -> b -> ML c
withLink3 :: (Link -> a -> b -> c -> IO d) -> a -> b -> c -> ML d
withLink4 :: (Link -> a -> b -> c -> d -> IO e) -> a -> b -> c -> d -> ML e
Documentation
runMathLink :: [Function] -> IO ()Source
Runs MathLink, exposing the given list of functions.
runMathLinkWithArgs :: [String] -> [Function] -> IO ()Source
Like runMathLink, but explicitly specifies the command line arguments to be passed to MathLink.
evaluate :: String -> ML BoolSource

Sends the given String to Mathematica for evaluation.

Does not block

evaluateString :: String -> ML BoolSource
Like evaluate, but blocks until the execution is complete.
getLink :: ML LinkSource
Returns the link associated with this thread of execution.
throwOnError :: Integral a => a -> ML ()Source
boolToError :: Bool -> ML ()Source
getType :: ML TypeSource
Gets the type of the next expression to be read on the MathLink connection.
putFunctionHead :: String -> Int -> ML ()Source
getFunctionHead :: ML (String, Int)Source
putScalarWith :: (Link -> b -> IO CInt) -> (a -> b) -> a -> ML ()Source
Helper for marshaling scalar values to Mathematica.
getScalarWith :: Storable a => (Link -> Ptr a -> IO CInt) -> (a -> b) -> ML bSource
Helper for marshaling scalar values from Mathematica.
putStringWith :: (Link -> CString -> IO CInt) -> String -> ML ()Source
Helper for marshaling Strings to Mathematica.
getStringWith :: (Link -> Ptr CString -> IO CInt) -> (Link -> CString -> IO ()) -> ML StringSource
Helper for marshaling Strings from Mathematica.
withLink0 :: (Link -> IO a) -> ML aSource
withLink1 :: (Link -> a -> IO b) -> a -> ML bSource
withLink2 :: (Link -> a -> b -> IO c) -> a -> b -> ML cSource
withLink3 :: (Link -> a -> b -> c -> IO d) -> a -> b -> c -> ML dSource
withLink4 :: (Link -> a -> b -> c -> d -> IO e) -> a -> b -> c -> d -> ML eSource
Produced by Haddock version 2.3.0