|
definition: |
orInExpr :: Expr -> Bool
orInExpr (Var _) = False
orInExpr (Lit _) = False
orInExpr (Comb _ f es) = f==("Prelude","?") || foldr (||) False (map orInExpr es)
orInExpr (Free _ e) = orInExpr e
orInExpr (Let bs e) = any orInExpr (map snd bs) || orInExpr e
orInExpr (Or _ _) = True
orInExpr (Case _ e bs) = orInExpr e || any orInBranch bs
where orInBranch (Branch _ be) = orInExpr be
|
|
demand: |
argument 1 |
|
deterministic: |
deterministic operation |
|
documentation: |
----------------------------------------------------------------------- Check an expression for occurrences of OR: |
|
failfree: |
<FAILING> |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{({Var}) |-> {False} || ({Lit}) |-> {False} || ({Comb}) |-> _ || ({Free}) |-> _ || ({Let}) |-> _ || ({Or}) |-> {True} || ({Case}) |-> _}
|
|
name: |
orInExpr |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
FlatCurry.Types.Expr -> Prelude.Bool |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |