From 946d8bcd81c1ea580032cd9f8140aad223b3156f Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Thu, 30 Oct 2014 07:03:03 +1100 Subject: Bugfix: alignment of variables in solution was incorrect --- Math/LinProg/LPSolve/FFI.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Math/LinProg/LPSolve') diff --git a/Math/LinProg/LPSolve/FFI.hs b/Math/LinProg/LPSolve/FFI.hs index ff0bc16..64919b9 100644 --- a/Math/LinProg/LPSolve/FFI.hs +++ b/Math/LinProg/LPSolve/FFI.hs @@ -13,6 +13,7 @@ module Math.LinProg.LPSolve.FFI ( ,setRHS ,solve ,getSol + ,debugDump ) where import Foreign @@ -56,6 +57,10 @@ foreign import ccall "set_constr_type" c_set_constr_type :: LPRec -> CInt -> CIn foreign import ccall "set_timeout" c_set_timeout :: LPRec -> CLong -> IO () foreign import ccall "set_int" c_set_int :: LPRec -> CInt -> CChar -> IO CChar foreign import ccall "set_binary" c_set_binary :: LPRec -> CInt -> CChar -> IO CChar +foreign import ccall "print_debugdump" c_print_debugdump :: LPRec -> CString -> IO () + +debugDump :: LPRec -> FilePath -> IO () +debugDump lp path = withCString path $ \str -> c_print_debugdump lp str setTimeout :: LPRec -> Integer -> IO () setTimeout lp x = c_set_timeout lp (fromIntegral x) -- cgit v1.2.3