1995-08-09 08:06:35 -07:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
2011-07-27 07:17:02 -07:00
|
|
|
(* OCaml *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* *)
|
|
|
|
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Copyright 1996 Institut National de Recherche en Informatique et *)
|
1999-11-17 10:59:06 -08:00
|
|
|
(* en Automatique. All rights reserved. This file is distributed *)
|
|
|
|
(* under the terms of the Q Public License version 1.0. *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
(* $Id$ *)
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
(* Detection of partial matches and unused match cases. *)
|
2001-02-19 12:27:52 -08:00
|
|
|
open Types
|
1995-05-04 03:15:53 -07:00
|
|
|
open Typedtree
|
|
|
|
|
2002-05-24 07:34:37 -07:00
|
|
|
val top_pretty : Format.formatter -> pattern -> unit
|
|
|
|
val pretty_pat : pattern -> unit
|
|
|
|
val pretty_line : pattern list -> unit
|
|
|
|
val pretty_matrix : pattern list list -> unit
|
|
|
|
|
2001-02-19 12:27:52 -08:00
|
|
|
val omega : pattern
|
|
|
|
val omegas : int -> pattern list
|
2000-08-11 12:58:52 -07:00
|
|
|
val omega_list : 'a list -> pattern list
|
2001-02-19 12:27:52 -08:00
|
|
|
val normalize_pat : pattern -> pattern
|
|
|
|
val all_record_args :
|
|
|
|
(label_description * pattern) list -> (label_description * pattern) list
|
2000-08-11 12:58:52 -07:00
|
|
|
|
2001-02-19 12:27:52 -08:00
|
|
|
val le_pat : pattern -> pattern -> bool
|
|
|
|
val le_pats : pattern list -> pattern list -> bool
|
2000-08-11 12:58:52 -07:00
|
|
|
val compat : pattern -> pattern -> bool
|
|
|
|
val compats : pattern list -> pattern list -> bool
|
2001-02-19 12:27:52 -08:00
|
|
|
exception Empty
|
|
|
|
val lub : pattern -> pattern -> pattern
|
|
|
|
val lubs : pattern list -> pattern list -> pattern list
|
|
|
|
|
|
|
|
val get_mins : ('a -> 'a -> bool) -> 'a list -> 'a list
|
|
|
|
|
2005-03-11 02:12:05 -08:00
|
|
|
(* Those to functions recombine one pattern and its arguments:
|
|
|
|
For instance:
|
|
|
|
(_,_)::p1::p2::rem -> (p1, p2)::rem
|
|
|
|
The second one will replace mutable arguments by '_'
|
|
|
|
*)
|
2001-02-19 12:27:52 -08:00
|
|
|
val set_args : pattern -> pattern list -> pattern list
|
2005-03-11 02:12:05 -08:00
|
|
|
val set_args_erase_mutable : pattern -> pattern list -> pattern list
|
2001-02-19 12:27:52 -08:00
|
|
|
|
|
|
|
val pat_of_constr : pattern -> constructor_description -> pattern
|
|
|
|
val complete_constrs :
|
|
|
|
pattern -> constructor_tag list -> constructor_description list
|
2000-08-11 12:58:52 -07:00
|
|
|
|
2003-08-18 01:26:18 -07:00
|
|
|
val pressure_variants: Env.t -> pattern list -> unit
|
|
|
|
val check_partial: Location.t -> (pattern * expression) list -> partial
|
2010-10-15 23:09:25 -07:00
|
|
|
val check_partial_gadt:
|
2011-07-29 03:32:43 -07:00
|
|
|
((string,constructor_description) Hashtbl.t ->
|
|
|
|
(string,label_description) Hashtbl.t ->
|
|
|
|
Parsetree.pattern -> pattern option) ->
|
|
|
|
Location.t -> (pattern * expression) list -> partial
|
1999-11-30 08:07:38 -08:00
|
|
|
val check_unused: Env.t -> (pattern * expression) list -> unit
|
2000-08-11 12:58:52 -07:00
|
|
|
|
2008-07-09 06:03:38 -07:00
|
|
|
(* Irrefutability tests *)
|
2008-06-16 02:08:55 -07:00
|
|
|
val irrefutable : pattern -> bool
|
2008-07-09 06:03:38 -07:00
|
|
|
val fluid : pattern -> bool
|