|
definition: |
main :: IO ()
main = do
putStrLn banner
args <- getArgs
processArgs defaultOptions args
where
processArgs opts args = case args of
("-e":margs) -> processArgs (opts { withEncapsulate = True }) margs
("-t":margs) -> processArgs (opts { topLevelContracts = True }) margs
("-r":margs) -> processArgs (opts { executeProg = True }) margs
[mnamec] -> let mname = stripCurrySuffix mnamec
in transformStandalone opts mname
(transformedModName mname ++ ".curry")
_ -> putStrLn $ unlines $
["ERROR: Illegal arguments for transformation: " ++ unwords args
,""
,"Usage: cwrapper [-e] [-t] [-r] <module_name>"
,"-e : encapsulate nondeterminism of assertions"
,"-t : assert contracts only to top-level (not recursive) calls"
,"-r : load the transformed program into Curry system"
]
|
|
demand: |
no demanded arguments |
|
deterministic: |
deterministic operation |
|
documentation: |
--------------------------------------------------------------------- Start the contract wrapper in "stand-alone mode": |
|
indeterministic: |
might be indeterministic |
|
infix: |
no fixity defined |
|
iotype: |
{() |-> _}
|
|
name: |
main |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
Prelude.IO () |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |