Module TransformPluralArguments

A tool to support plural arguments by a transformation on Curry programs.

Author: Michael Hanus

Version: December 2018

Summary of exported operations:

:: String   
defaultTParam :: TParam   
setRunQuiet :: TParam -> TParam   
setCompile :: TParam -> TParam   
setExec :: TParam -> TParam   
main :: IO ()   
usageInfo :: String   
transformPlural :: TParam -> String -> IO ()   
compileAcyFcy :: Bool -> String -> IO ()   
pluralArgsOfProg :: CurryProg -> [((String,String),[Int])]   
pluralArgsOfFunc :: CFuncDecl -> [((String,String),[Int])]   
pluralArgsOfType :: Int -> CTypeExpr -> [Int]   
tcPlural :: (String,String)   
tcPluralArg :: (String,String)   
tcplural :: (String,String)   
tPluralProg :: [((String,String),[Int])] -> CurryProg -> CurryProg   
tPluralFunc :: String -> [((String,String),[Int])] -> CFuncDecl -> CFuncDecl   
tPluralType :: [Int] -> Int -> CTypeExpr -> CTypeExpr   
tPluralRule :: String -> [((String,String),[Int])] -> [Int] -> CRule -> CRule   
replacePluralCPatterns :: [Int] -> (Int,CPattern) -> CPattern   
funPatError :: a   
lazyPatError :: a   
recPatError :: a   
freshVar :: Int -> (Int,String)   
matchForPluralCPatterns :: String -> [Int] -> (Int,CPattern) -> [CExpr]   
pluralVarsOfPattern :: String -> [Int] -> (Int,CPattern) -> ([((Int,String),CExpr)],[CFuncDecl])   
pluralVarsOfPattern' :: String -> [Int] -> (Int,String) -> (Int,CPattern) -> ([((Int,String),CExpr)],[CFuncDecl])   
projectPluralPatternVars :: String -> (Int,String) -> String -> (Int,CPattern) -> [((Int,String),CExpr)]   
projectFunctions :: String -> CPattern -> String -> (Int,CPattern) -> [CFuncDecl]   
tPluralExp :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CExpr -> CExpr   
tPluralBranch :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> (CPattern,CRhs) -> (CPattern,CRhs)   
tPluralRhs :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CRhs -> CRhs   
tPluralLocalDecl :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CLocalDecl -> CLocalDecl   
tPluralStat :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CStatement -> CStatement   
tPluralApply :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CExpr -> CExpr -> CExpr   
apply2funcall :: CExpr -> Maybe ((String,String),[CExpr])   
preTrue :: CExpr   
list2conj :: [CExpr] -> CExpr   

Exported datatypes:


TParam

Constructors:

  • TParam :: Bool -> Bool -> Bool -> TParam

Exported operations:

defaultTParam :: TParam   

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

setRunQuiet :: TParam -> TParam   

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

setCompile :: TParam -> TParam   

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

setExec :: TParam -> TParam   

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

main :: IO ()   

usageInfo :: String   

transformPlural :: TParam -> String -> IO ()   

compileAcyFcy :: Bool -> String -> IO ()   

pluralArgsOfProg :: CurryProg -> [((String,String),[Int])]   

pluralArgsOfFunc :: CFuncDecl -> [((String,String),[Int])]   

pluralArgsOfType :: Int -> CTypeExpr -> [Int]   

tcPlural :: (String,String)   

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

tcPluralArg :: (String,String)   

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

tcplural :: (String,String)   

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

tPluralProg :: [((String,String),[Int])] -> CurryProg -> CurryProg   

tPluralFunc :: String -> [((String,String),[Int])] -> CFuncDecl -> CFuncDecl   

tPluralType :: [Int] -> Int -> CTypeExpr -> CTypeExpr   

tPluralRule :: String -> [((String,String),[Int])] -> [Int] -> CRule -> CRule   

replacePluralCPatterns :: [Int] -> (Int,CPattern) -> CPattern   

funPatError :: a   

lazyPatError :: a   

recPatError :: a   

freshVar :: Int -> (Int,String)   

matchForPluralCPatterns :: String -> [Int] -> (Int,CPattern) -> [CExpr]   

pluralVarsOfPattern :: String -> [Int] -> (Int,CPattern) -> ([((Int,String),CExpr)],[CFuncDecl])   

pluralVarsOfPattern' :: String -> [Int] -> (Int,String) -> (Int,CPattern) -> ([((Int,String),CExpr)],[CFuncDecl])   

projectPluralPatternVars :: String -> (Int,String) -> String -> (Int,CPattern) -> [((Int,String),CExpr)]   

projectFunctions :: String -> CPattern -> String -> (Int,CPattern) -> [CFuncDecl]   

tPluralExp :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CExpr -> CExpr   

tPluralBranch :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> (CPattern,CRhs) -> (CPattern,CRhs)   

tPluralRhs :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CRhs -> CRhs   

tPluralLocalDecl :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CLocalDecl -> CLocalDecl   

tPluralStat :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CStatement -> CStatement   

tPluralApply :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CExpr -> CExpr -> CExpr   

apply2funcall :: CExpr -> Maybe ((String,String),[CExpr])   

preTrue :: CExpr   

list2conj :: [CExpr] -> CExpr