Module Reduction

Module with operations to simplify patterns (like functional patterns, as patterns, lazy patterns).

Author: Lasse Folger (with changes by Michael Hanus)

Version: September 2015

Summary of exported operations:

newprog :: CurryProg -> CurryProg   
replaceFuncPattern :: [CFuncDecl] -> [CFuncDecl]   
transRule :: CRule -> CRule   
notnull :: [a] -> Bool   
transPattern :: [(Int,String)] -> CPattern -> ([(Int,String)],(CPattern,[((Int,String),CPattern)]))   
mkGuardL :: [(CExpr,CExpr)] -> CExpr -> [(CExpr,CExpr)]   
simplifyrep :: [[((Int,String),CPattern)]] -> [((Int,String),CPattern)]   
pToExp :: [((Int,String),CPattern)] -> (CExpr,[CLocalDecl])   
findAs :: CPattern -> [((Int,String),CPattern)]   
translate :: CPattern -> CExpr   

Exported operations:

transRule :: CRule -> CRule   

notnull :: [a] -> Bool   

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

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

Further infos:
  • partially defined

mkGuardL :: [(CExpr,CExpr)] -> CExpr -> [(CExpr,CExpr)]   

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

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

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

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

translate :: CPattern -> CExpr