]> matita.cs.unibo.it Git - helm.git/blob - helm/software/components/ng_kernel/nReference.mli
Preparing for 0.5.9 release.
[helm.git] / helm / software / components / ng_kernel / nReference.mli
1 (*
2     ||M||  This file is part of HELM, an Hypertextual, Electronic        
3     ||A||  Library of Mathematics, developed at the Computer Science     
4     ||T||  Department, University of Bologna, Italy.                     
5     ||I||                                                                
6     ||T||  HELM is free software; you can redistribute it and/or         
7     ||A||  modify it under the terms of the GNU General Public License   
8     \   /  version 2 or (at your option) any later version.      
9      \ /   This software is distributed as is, NO WARRANTY.     
10       V_______________________________________________________________ *)
11
12 (* $Id$ *)
13
14 exception IllFormedReference of string Lazy.t
15
16 type spec = 
17  | Decl 
18  | Def of int              (* height *)
19  | Fix of int * int * int  (* fixno, recparamno, height *)
20  | CoFix of int
21  | Ind of bool * int * int (* inductive, indtyno, leftno *)
22  | Con of int * int * int  (* indtyno, constrno, leftno  *)
23
24 type reference = private Ref of NUri.uri * spec
25
26 val reference_of_spec: NUri.uri -> spec -> reference
27
28 val eq: reference -> reference -> bool
29 val compare: reference -> reference -> int
30 val string_of_reference: reference -> string 
31 val reference_of_string: string -> reference
32
33 (* given the reference of an inductive type, returns the i-th contructor *)
34 val mk_constructor: int -> reference -> reference
35 (* given the reference of an inductive type constructor, returns the indty *)
36 val mk_indty: bool -> reference -> reference
37 val mk_fix: int -> int -> reference -> reference
38 val mk_cofix: int -> reference -> reference