CurryInfo: property-prover-2.0.0 / Inference.Inference.isTrivialRule

definition:
isTrivialRule :: TARule -> Maybe TAExpr
isTrivialRule (AExternal _ _)  = Nothing
isTrivialRule (ARule _ _ expr) = case expr of
  AComb _ _ (qn, _) _ -> case qn of
    ("Prelude", "True")  -> Just expr
    ("Prelude", "False") -> Just expr
    _                    -> Nothing
  _                   -> Nothing
demand:
argument 1
deterministic:
deterministic operation
documentation:
--- If a rule has a constant Boolean expression, return it
failfree:
_
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{({AExternal}) |-> {Nothing} || ({ARule}) |-> _}
name:
isTrivialRule
precedence:
no precedence defined
result-values:
{Just,Nothing}
signature:
FlatCurry.Annotated.Types.ARule FlatCurry.Types.TypeExpr
-> Prelude.Maybe (FlatCurry.Annotated.Types.AExpr FlatCurry.Types.TypeExpr)
solution-complete:
operation might suspend on free variables
terminating:
yes
totally-defined:
reducible on all ground data terms