definition:
|
checkThenTrueElseFalse' :: SpanInfo -> String -> CSM ()
checkThenTrueElseFalse' (SpanInfo sp _) s =
report ( Message
sp
( text "superfluous code"
<+> colorizeKey "then bool else not (bool)"
)
( text "write instead of if"
<+> colorizeKey "condition"
<+> text "then True (False) else False (True) just "
<+> colorizeKey (s ++ "condition")
)
)
checkThenTrueElseFalse' NoSpanInfo _ = return ()
|
demand:
|
argument 1
|
deterministic:
|
deterministic operation
|
documentation:
|
-- Emits a warning for a superfluous if-then-else construct, given some span info.
|
failfree:
|
(_, _)
|
indeterministic:
|
referentially transparent operation
|
infix:
|
no fixity defined
|
iotype:
|
{({SpanInfo},_) |-> _ || ({NoSpanInfo},_) |-> _}
|
name:
|
checkThenTrueElseFalse'
|
precedence:
|
no precedence defined
|
result-values:
|
_
|
signature:
|
Curry.SpanInfo.SpanInfo -> String
-> Control.Monad.Trans.State.StateT Types.CheckState Data.Functor.Identity.Identity ()
|
solution-complete:
|
operation might suspend on free variables
|
terminating:
|
possibly non-terminating
|
totally-defined:
|
possibly non-reducible on same data term
|