■
The following code shows a sample of calling a program in Haskell code.
It works with compilation (i.e., >ghc CallSATSolver.hs) but not GHCI.
import System.Exit
import System.Process
import Control.Monadmain :: IO ()
main = do
putStrLn "Running command..."
pid <- runCommand "minisat sat_in.txt" -- or whatever you want
waitForProcess pid >>= exitWith