SetDirectory["~/hs/mathlink/examples/"]

Wrapping the MathLink executable in a shell script is a nice way to pass extra arguments to the GHC RTS without interfering with the command line arguments that MathLink needs to pass to establish the connection.

lnk=Install["mltest.sh"]

AddTwo[2,3]

ReverseNumbers[1,2,3,I,E,π]

ReverseArray[{{1,2,3},{4,5,6}}]

TweakExpression[{ASymbol,"A string",3,N[π],a+b+c}]

AddExtendedComplexes[1+3I,2+5I]

AddExtendedComplexes[Infinity,1+3I]

AbortTest[50]

Uninstall[lnk]