Module RunCurry

This program implements the runcurry command that allows to run a Curry program without explicitly invoking the REPL.

Basically, it has three modes of operation:

  • execute the main operation of a Curry program whose file name is provided as an argument
  • execute the main operation of a Curry program whose program text comes from the standard input
  • execute the main operation of a Curry program whose program text is in a script file (starting with #!/usr/bin/env runcurry). If the script file contains the line #jit, it is compiled and saved as an executable so that it is faster executed when called the next time.

Author: Michael Hanus

Version: December 2018

Summary of exported operations:

main :: IO ()   
usageMsg :: String   
checkFirstArg :: [String] -> [String] -> IO ()   
execOrJIT :: String -> String -> String -> [String] -> [String] -> IO Int   
isHashJITOption :: String -> Bool   
noHashLine :: String -> Bool   
getNewProgramName :: IO String   
isExecutable :: String -> IO Bool   
replOpts :: String   
saveCurryProgram :: String -> [String] -> String -> IO Int   
execCurryProgram :: String -> [String] -> [String] -> IO Int   
execAndDeleteCurryProgram :: String -> [String] -> [String] -> IO Int   
stripSpaces :: String -> String   

Exported operations:

main :: IO ()   

usageMsg :: String   

checkFirstArg :: [String] -> [String] -> IO ()   

execOrJIT :: String -> String -> String -> [String] -> [String] -> IO Int   

isHashJITOption :: String -> Bool   

noHashLine :: String -> Bool   

getNewProgramName :: IO String   

isExecutable :: String -> IO Bool   

replOpts :: String   

Further infos:
  • solution complete, i.e., able to compute all solutions

saveCurryProgram :: String -> [String] -> String -> IO Int   

execCurryProgram :: String -> [String] -> [String] -> IO Int   

execAndDeleteCurryProgram :: String -> [String] -> [String] -> IO Int   

stripSpaces :: String -> String