-- -- Example of how to bind to non-GAC modules such as -- your own .NET code you want to call upon from Haskell. -- module Local where import NET -- see local.cs for the C# code making up the example component -- we are binding to. -- Notice the @[..]@ prefix; the referred to DLL has to be available -- somewhere along your PATH. addUp :: Int -> Int -> IO Int addUp x y = invokeStatic "[local.dll]Local" "Add" (x,y) testLocal :: IO () testLocal = do let a = 2 let b = 3 c <- addUp a b putStrLn (unwords [show a, "+", show b, "=", show c])