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

definition:
missingConsInBranch :: ProgInfo (TypeDecl, [Constructor])
                    -> [TABranchExpr]
                    -> (Maybe TypeDecl, [Constructor], [Constructor])
missingConsInBranch _ []
  = error "missingConsInBranch: case with empty branches!"
missingConsInBranch _ (ABranch (ALPattern _ _) _ : _) = (Nothing, [], []) --error "TODO: case with literal pattern"
missingConsInBranch info (ABranch (APattern _ (cons, _) args) _ : brs)
  = let (decl, othercons)  = fromMaybe
          (error
           $ "Sibling constructors of " ++ showQName cons ++ " not found!")
          (lookupProgInfo cons info)
        branchcons         = map (patCons . branchPattern) brs
        (missing, covered) = partition ((`notElem` branchcons) . fst) othercons
    in (Just decl, missing, (cons, length args) : covered)
demand:
argument 2
deterministic:
deterministic operation
documentation:
-- Splits the constructors (name/arity) which are missing in the given
-- branches of a case construct from the ones covered
failfree:
<FAILING>
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{(_,{:}) |-> {(,,)}}
name:
missingConsInBranch
precedence:
no precedence defined
result-values:
{(,,)}
signature:
Analysis.ProgInfo.ProgInfo (FlatCurry.Types.TypeDecl, [((String, String), Prelude.Int)])
-> [FlatCurry.Annotated.Types.ABranchExpr FlatCurry.Types.TypeExpr]
-> (Prelude.Maybe FlatCurry.Types.TypeDecl, [((String, String), Prelude.Int)], [((String, String), Prelude.Int)])
solution-complete:
operation might suspend on free variables
terminating:
possibly non-terminating
totally-defined:
possibly non-reducible on same data term