1(*
2    Copyright David C. J. Matthews 2009
3
4    This library is free software; you can redistribute it and/or
5    modify it under the terms of the GNU Lesser General Public
6    License as published by the Free Software Foundation; either
7    version 2.1 of the License, or (at your option) any later version.
8    
9    This library is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    Lesser General Public License for more details.
13    
14    You should have received a copy of the GNU Lesser General Public
15    License along with this library; if not, write to the Free Software
16    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17*)
18
19signature SIGNATURESSIG =
20sig
21    type sigs
22    type structSigBind
23    type parsetree
24    type typeParsetree
25    type typeVarForm
26    type pretty
27    type ptProperties
28    type env
29    type signatures
30    type lexan
31    type typeId
32    type specs
33    type location =
34        { file: string, startLine: FixedInt.int, startPosition: FixedInt.int,
35          endLine: FixedInt.int, endPosition: FixedInt.int }
36    type exportTree = location * ptProperties list
37    type navigation =
38        {parent: (unit -> exportTree) option,
39         next: (unit -> exportTree) option,
40         previous: (unit -> exportTree) option}
41
42    val mkStructureSig:     structSigBind list * location -> specs
43    val mkStructureSigBinding: (string * location) * (sigs * bool * location) * location -> structSigBind
44    val mkValSig:           (string * location) * typeParsetree * location -> specs
45    val mkExSig:            (string * location) * typeParsetree option * location -> specs
46    val mkCoreType:         parsetree * location -> specs
47    val mkSharing:          bool * (string * location) list * location -> specs
48    val mkWhereType:        sigs * typeVarForm list * string * typeParsetree * location -> sigs
49    val mkInclude:          sigs list * location -> specs
50    val mkSigIdent:         string * location -> sigs;
51    val mkSig:              specs list * location -> sigs;
52
53    val displaySigs: sigs * FixedInt.int -> pretty
54    val sigExportTree: navigation * sigs -> exportTree 
55    val sigVal: sigs * int * (int->typeId) * env * lexan * location -> signatures
56    val undefinedSignature: signatures
57    val isUndefinedSignature: signatures -> bool
58
59    structure Sharing:
60    sig
61        type sigs           = sigs
62        type structSigBind  = structSigBind
63        type signatures     = signatures
64        type parsetree      = parsetree
65        type typeParsetree  = typeParsetree
66        type typeVarForm    = typeVarForm
67        type pretty         = pretty
68        type ptProperties   = ptProperties
69        type env            = env
70        type lexan          = lexan
71        type typeId         = typeId
72        type specs          = specs
73    end
74end;
75