CurryInfo: verify-non-fail-2.0.0 / Verify.NonFailConditions.transTester

definition: Info
 
transTester :: [(QName,ConsInfo)] -> QName -> Expr -> Expr
transTester consinfos qc exp
  | qc == pre "True"  = exp
  | qc == pre "False" = fcNot exp
  | qc == pre "[]"    = Comb FuncCall (pre "null") [exp]
  | qc == pre ":"     = fcNot (Comb FuncCall (pre "null") [exp])
  | otherwise
  = Case Rigid exp
      ([Branch (Pattern qc (take arity [100..])) fcTrue] ++
       if null siblings then [] else [Branch (Pattern anonCons []) fcFalse])
 where
  (arity,_,siblings) = infoOfCons consinfos qc
demand: Info
 argument 2
deterministic: Info
 deterministic operation
documentation: Info
 
Generate a test predicate for a given data constructor and an expression.
generated by `Main.aCallType2Bool`.
failfree: Info
 (_, _, _)
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_,_,_) |-> _}
name: Info
 transTester
precedence: Info
 no precedence defined
result-values: Info
 _
signature: Info
 [((String, String), (Prelude.Int, Verify.ProgInfo.ConsType, [((String, String), Prelude.Int)]))]
-> (String, String) -> FlatCurry.Types.Expr -> FlatCurry.Types.Expr
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 possibly non-reducible on same data term