CurryInfo: call-analysis-3.2.0 / Analysis.applyPrimDTerm

definition: Info
 
applyPrimDTerm :: String -> [DTerm] -> Maybe DTerm
applyPrimDTerm f args
  | f `elem` allStrictOps
  = if DBot `elem` args
      then Just DBot   -- these primitive operations are strict in all arguments
      else Just CutVar -- otherwise we do not know anything
  | f `elem` fstP2StrictOps
  = if head args == DBot
      then Just DBot  -- strict in first argument
      else Just (args!!1) -- otherwise it is as most defined as second argument
  | f == "failed"
  = Just DBot -- result of failed is always undefined
  | otherwise = Nothing
 where
  -- operations strict in all arguments
  allStrictOps = ["+","-","*","mod","div","<","<=",">",">=","==","/=",
                  "=:=","show","isEmpty"]
  -- operations strict in first argument and projection on second argument
  fstP2StrictOps = ["cond","set1"]
demand: Info
 no demanded arguments
deterministic: Info
 deterministic operation
documentation: Info
 
Abstract application of a primitive operation to abstract terms.
The result is Nothing if this application is not defined, e.g.,
becuase the operation is not a primitive one.
failfree: Info
 <FAILING>
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_,_) |-> {Just,Nothing}}
name: Info
 applyPrimDTerm
precedence: Info
 no precedence defined
result-values: Info
 {Just,Nothing}
signature: Info
 String -> [DTerm] -> Prelude.Maybe DTerm
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 possibly non-reducible on same data term