|
definition: |
fcNot :: Expr -> Expr
fcNot e = case e of
Comb ConsCall qf [] | qf == pre "False" -> fcTrue
| qf == pre "True" -> fcFalse
Comb FuncCall qf [e1] | qf == pre "not" -> e1
Comb FuncCall qf [e1,e2] | qf == pre "&&" -> fcOr (fcNot e1) (fcNot e2)
| qf == pre "||" -> fcAnd (fcNot e1) (fcNot e2)
Case ct ce brs -> Case ct ce (map (\(Branch p be) -> Branch p (fcNot be)) brs)
_ -> Comb FuncCall (pre "not") [e]
|
|
demand: |
argument 1 |
|
deterministic: |
deterministic operation |
|
documentation: |
Negation of an expression. |
|
failfree: |
_ |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{({Comb}) |-> _ || ({Case}) |-> {Case} || ({Var}) |-> _ || ({Lit}) |-> _ || ({Let}) |-> _ || ({Free}) |-> _ || ({Or}) |-> _ || ({Typed}) |-> _}
|
|
name: |
fcNot |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
FlatCurry.Types.Expr -> FlatCurry.Types.Expr |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |