CurryInfo: call-analysis-3.2.0 / Analysis.unApply

definition: Info
 
unApply :: [Rule] -> [Rule]
unApply = map unApplyInRule . filter (not . applyRule)
 where
  -- does the rule defines the generated apply operation?
  applyRule (Rule f _ _) = f == "apply"

  unApplyInRule :: Rule -> Rule
  unApplyInRule (Rule f args exp) = Rule f args (unApplyInExp exp)

  unApplyInExp :: Term -> Term
  unApplyInExp (Var i) = Var i
  unApplyInExp (Func Cons c args) = Func Cons c (map unApplyInExp args)
  unApplyInExp (Func Def f args) =
    if f=="apply" && length args == 2
    then Func Def "$" args
    else Func Def f (map unApplyInExp args)
demand: Info
 no demanded arguments
deterministic: Info
 deterministic operation
documentation: Info
 
--------------------------------------------------------------------
Remove all occurrences of generated apply operation in a program
failfree: Info
 ()
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {() |-> {.._#lambda508}}
name: Info
 unApply
precedence: Info
 no precedence defined
result-values: Info
 {.._#lambda508}
signature: Info
 [TRS.Rule] -> [TRS.Rule]
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 reducible on all ground data terms