aboutsummaryrefslogtreecommitdiffhomepage
path: root/contrib/extraction/extraction.mli
blob: e3a747ce0750491d8ee0bf7ad449e997cc9625b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
(***********************************************************************)
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team    *)
(* <O___,, *        INRIA-Rocquencourt  &  LRI-CNRS-Orsay              *)
(*   \VV/  *************************************************************)
(*    //   *      This file is distributed under the terms of the      *)
(*         *       GNU Lesser General Public License Version 2.1       *)
(***********************************************************************)

(*i $Id$ i*)

(*s Extraction from Coq terms to Miniml. *)

open Names
open Term
open Miniml
open Environ
open Nametab

(*s Result of an extraction. *)

type info = Logic | Info

type arity = Arity | NotArity

type type_var = info * arity

type signature = type_var list

type extraction_result =
  | Emltype of ml_type * signature * identifier list
  | Emlterm of ml_ast

(*s Extraction function. *)

val extract_constr : env -> constr -> extraction_result

(*s ML declaration corresponding to a Coq reference. *)

val extract_declaration : global_reference -> ml_decl

(*s Check whether a global reference corresponds to a logical inductive. *)

val decl_is_logical_ind : global_reference -> bool

(*s Check if a global reference corresponds to the constructor of 
  a singleton inductive. *)

val decl_is_singleton : global_reference -> bool