CurryInfo: icurry-3.2.0 / ICurry.Main.icurryOnModule

definition:
icurryOnModule :: ICOptions -> String -> IO ()
icurryOnModule opts modname = do
  checkExecutables opts
  iprog <- icCompile opts modname
  let imain = optMain opts
  if null imain
    then
      if optOutput opts == "-"
        then putStrLn (showTerm iprog)
        else do
          icyname <- if null (optOutput opts) then iCurryFilePath modname
                                              else return $ optOutput opts
          writeICurryFile icyname iprog
          printStatus opts $ "ICurry program written to '" ++ icyname ++ "'"
    else do
      printStatus opts $ "Executing main function '" ++ imain ++ "'..."
      let iopts1 = defOpts { icOptions = opts }
          iopts2 = if optShowGraph opts > 0 then iopts1 { waitTime = 1 }
                                            else iopts1
      states <- execIProg iopts2 iprog imain
      let xmlgraphs = states2XmlGraphs states
      when (optTermGraph opts && (not $ null $ optXMLOutput opts)) $
        writeXmlFile (((++ ".xml") . optXMLOutput) opts) xmlgraphs
      when (optTermGraph opts && (not $ null $ optGraphOutput opts)) $ do
        createDirectoryIfMissing True (optGraphOutput opts)
        graphs2Svgs (optShowNodeIDs opts)
                    (graphSvg Nothing)
                    ((optGraphOutput opts) ++ "/img")
                    states
      when (optTermGraph opts && (not $ null $ optTreeOutput opts)) $ do
        createDirectoryIfMissing True (optTreeOutput opts)
        graphs2Svgs (optShowNodeIDs opts)
                    (treeSvg (optTreeDepth opts) Nothing)
                    ((optTreeOutput opts) ++ "/img")
                    states
demand:
no demanded arguments
deterministic:
deterministic operation
failfree:
<FAILING>
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{(_,_) |-> _}
name:
icurryOnModule
precedence:
no precedence defined
result-values:
_
signature:
ICurry.Options.ICOptions -> String -> Prelude.IO ()
solution-complete:
operation might suspend on free variables
terminating:
possibly non-terminating
totally-defined:
possibly non-reducible on same data term