Module TransDefRules

Translator for Curry programs to implement default rules and deterministic functions.

Author: Michael Hanus

Version: October 2016

Summary of exported operations:

:: String   
defaultTransScheme :: TransScheme   
transDefaultRules :: Int -> [String] -> String -> CurryProg -> IO (Maybe CurryProg)   
filterProofObligation :: Int -> [String] -> [(String,String)] -> IO [(String,String)]   
printProofObligation :: [(String,String)] -> IO ()   
showQName :: (String,String) -> String   
translateProg :: TransScheme -> CurryProg -> IO (Maybe ([(String,String)],CurryProg))   
isDetFun :: CFuncDecl -> Bool   
transDetFun :: [(String,String)] -> CFuncDecl -> [CFuncDecl]   
removeDetResultType :: CQualTypeExpr -> CQualTypeExpr   
func2rule :: CFuncDecl -> ((String,String),(Int,CRule))   
transFDecl :: TransScheme -> [((String,String),(Int,CRule))] -> CFuncDecl -> [CFuncDecl]   
transFDecl2ApplyCond :: (String,String) -> CFuncDecl -> CFuncDecl   
adjustResultTypeToUnit :: CQualTypeExpr -> CQualTypeExpr   
transFDecl2FunRHS :: (String,String) -> CFuncDecl -> CFuncDecl   
adjustResultTypeToFunRHS :: CQualTypeExpr -> CQualTypeExpr   
transDefaultRule :: (String,String) -> Int -> CRule -> CRule   
preUnit :: CExpr   
preUntyped :: CTypeExpr   
setFunMod :: String   
extractSingles :: Eq a => [a] -> [a]   
Extracts all elements with a single occurrence in a given list.
anonymPat :: [(Int,String)] -> CPattern -> CPattern   
Replaces all variables occurring in the first argument by anonymous variables in a pattern.

Exported datatypes:


TransScheme

Constructors:

  • SpecScheme :: TransScheme
  • NoDupScheme :: TransScheme

Exported operations:

transDefaultRules :: Int -> [String] -> String -> CurryProg -> IO (Maybe CurryProg)   

filterProofObligation :: Int -> [String] -> [(String,String)] -> IO [(String,String)]   

printProofObligation :: [(String,String)] -> IO ()   

showQName :: (String,String) -> String   

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

translateProg :: TransScheme -> CurryProg -> IO (Maybe ([(String,String)],CurryProg))   

isDetFun :: CFuncDecl -> Bool   

transDetFun :: [(String,String)] -> CFuncDecl -> [CFuncDecl]   

func2rule :: CFuncDecl -> ((String,String),(Int,CRule))   

transFDecl :: TransScheme -> [((String,String),(Int,CRule))] -> CFuncDecl -> [CFuncDecl]   

transFDecl2ApplyCond :: (String,String) -> CFuncDecl -> CFuncDecl   

transFDecl2FunRHS :: (String,String) -> CFuncDecl -> CFuncDecl   

transDefaultRule :: (String,String) -> Int -> CRule -> CRule   

preUnit :: CExpr   

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

preUntyped :: CTypeExpr   

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

setFunMod :: String   

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

extractSingles :: Eq a => [a] -> [a]   

Extracts all elements with a single occurrence in a given list.

anonymPat :: [(Int,String)] -> CPattern -> CPattern   

Replaces all variables occurring in the first argument by anonymous variables in a pattern.