CurryInfo: nonstrictunif-optimize-3.0.0 / CurryBrowseAnalysis.Dependency.analyseWithDependencies

definition:
 
analyseWithDependencies :: (FuncDecl->a) -> ([a]->a) -> [FuncDecl] -> [(QName,a)]
analyseWithDependencies funproperty combine funs = map anaFun alldeps
  where
    anaFun (name,depfuns) = (name, combine (map (lookupProp funprops) (name:depfuns)))

    funprops = map (\f->(funcName f, funproperty f)) funs

    alldeps = indirectlyDependent funs

    lookupProp :: [(QName,a)] -> QName -> a
    lookupProp fprops fun = fromJust (lookup fun fprops)

    funcName (Func fname _ _ _ _) = fname
demand:
 argument 3
deterministic:
 deterministic operation
documentation:
 
Generic global function analysis where the property of each function is a combination
of a property of the function and all its dependent functions.
1. parameter: a function that associates a property to each function declaration
2. parameter: an operation to combine the properties of function/dependent functions
failfree:
 <FAILING>
indeterministic:
 referentially transparent operation
infix:
 no fixity defined
iotype:
 {(_,_,_) |-> {:,[]}}
name:
 analyseWithDependencies
precedence:
 no precedence defined
result-values:
 {:,[]}
signature:
 (FlatCurry.Types.FuncDecl -> a) -> ([a] -> a) -> [FlatCurry.Types.FuncDecl]
-> [((String, String), a)]
solution-complete:
 operation might suspend on free variables
terminating:
 possibly non-terminating
totally-defined:
 possibly non-reducible on same data term