summaryrefslogtreecommitdiff
path: root/src/pattern_completeness.mli
diff options
context:
space:
mode:
authorThomas Bauereiss2019-06-12 17:15:10 +0100
committerThomas Bauereiss2019-06-12 17:48:19 +0100
commitd61140c5a922d8781356aa874a2fe2a7a36ed0ee (patch)
treed8caae8ac3e9ab0edcc291c96af293e836f6a264 /src/pattern_completeness.mli
parent22123333fc80bf5d3ee73c6692f3fba44892bcee (diff)
Handle partial matches in guarded pattern rewrite
Add a fallthrough case that fails to potentially partial pattern matches. This also helps to preserve any guard in the final match case, which might be needed for flow typing (see the discussion on issue #51). TODO: Merge with the MakeExhaustive rewrite, which currently does not support guarded patterns.
Diffstat (limited to 'src/pattern_completeness.mli')
-rw-r--r--src/pattern_completeness.mli2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pattern_completeness.mli b/src/pattern_completeness.mli
index 83d6d54c..3084bdf4 100644
--- a/src/pattern_completeness.mli
+++ b/src/pattern_completeness.mli
@@ -57,4 +57,6 @@ type ctx =
variants : IdSet.t Bindings.t
}
+val is_complete : ctx -> 'a pexp list -> bool
+
val check : Parse_ast.l -> ctx -> 'a pexp list -> unit