Module ICurry.Options

Definition and processing of options for the ICurry compiler.

Author: Michael Hanus, Sascha Ecks

Version: July 2022

Summary of exported operations:

defaultICOptions :: ICOptions  Deterministic 
setConsFuns :: ICOptions -> [(String,[((String,String),(Int,Int))])] -> [(String,[((String,String),Int)])] -> ICOptions  Deterministic 
addQMap :: ((String,String),a) -> [(String,Map String a)] -> [(String,Map String a)]  Deterministic 
qmapLookup :: (String,String) -> [(String,Map String a)] -> Maybe a  Deterministic 
arityPosOfCons :: ICOptions -> (String,String) -> (Int,Int)  Deterministic 
posOfCons :: ICOptions -> (String,String) -> Int  Deterministic 
posOfFun :: ICOptions -> (String,String) -> Int  Deterministic 
printStatus :: ICOptions -> String -> IO ()  Deterministic 
printIntermediate :: ICOptions -> String -> IO ()  Deterministic 
printDetails :: ICOptions -> String -> IO ()  Deterministic 
funError :: ICOptions -> String -> a  Deterministic 
processOptions :: String -> [String] -> IO (ICOptions,[String])  Non-deterministic 
Process the actual command line argument and return the options and the name of the main program.
usageText :: String  Non-deterministic 
options :: [OptDescr (ICOptions -> ICOptions)]  Non-deterministic 
showQName :: (String,String) -> String  Deterministic 

Exported datatypes:


ICOptions

Options for the ICurry compiler. Contains mappings from constructor and functions names into locally unique integers and other stuff.

Constructors:

  • ICOptions :: Int -> Bool -> Bool -> String -> String -> Int -> String -> Bool -> Bool -> FrontendParams -> [String] -> [(String,Map String (IArity,Int))] -> [(String,Map String Int)] -> QName -> Bool -> String -> String -> String -> Bool -> Int -> Int -> ICOptions

    Fields:

    • optVerb :: Int
    • optHelp :: Bool
    • optLift :: Bool
    • optOutput :: String
    • optMain :: String
    • optShowGraph :: Int
    • optViewPDF :: String
    • optInteractive :: Bool
    • optVarDecls :: Bool
    • optFrontendParams :: FrontendParams
    • optModsMaps :: [String]
    • optConsMap :: [(String,Map String (IArity,Int))]
    • optFunMap :: [(String,Map String Int)]
    • optFun :: QName
    • optTermGraph :: Bool
    • optXMLOutput :: String
    • optGraphOutput :: String
    • optTreeOutput :: String
    • optShowNodeIDs :: Bool
    • optTreeDepth :: Int
    • optMaxSteps :: Int

Exported operations:

setConsFuns :: ICOptions -> [(String,[((String,String),(Int,Int))])] -> [(String,[((String,String),Int)])] -> ICOptions  Deterministic 

addQMap :: ((String,String),a) -> [(String,Map String a)] -> [(String,Map String a)]  Deterministic 

qmapLookup :: (String,String) -> [(String,Map String a)] -> Maybe a  Deterministic 

arityPosOfCons :: ICOptions -> (String,String) -> (Int,Int)  Deterministic 

posOfCons :: ICOptions -> (String,String) -> Int  Deterministic 

posOfFun :: ICOptions -> (String,String) -> Int  Deterministic 

printStatus :: ICOptions -> String -> IO ()  Deterministic 

printIntermediate :: ICOptions -> String -> IO ()  Deterministic 

printDetails :: ICOptions -> String -> IO ()  Deterministic 

funError :: ICOptions -> String -> a  Deterministic 

processOptions :: String -> [String] -> IO (ICOptions,[String])  Non-deterministic 

Process the actual command line argument and return the options and the name of the main program.

usageText :: String  Non-deterministic 

showQName :: (String,String) -> String  Deterministic 

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