File: STRUCTURESSIG.sml

package info (click to toggle)
polyml 5.7.1-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 40,616 kB
  • sloc: cpp: 44,142; ansic: 26,963; sh: 22,002; asm: 13,486; makefile: 602; exp: 525; python: 253; awk: 91
file content (121 lines) | stat: -rw-r--r-- 4,867 bytes parent folder | download | duplicates (4)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
(*
    Copyright (c) 2000
        Cambridge University Technical Services Limited
        
    Modified David C. J. Matthews 2009.

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
    
    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.
    
    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*)

(*****************************************************************************)
(*                  STRUCTURES export signature                              *)
(*****************************************************************************)
signature STRUCTURESSIG =
sig
    type structDec
    type structValue
    type structVals;
    type types;
    type parsetree;
    type lexan;
    type pretty;
    type values;
    type typeConstrSet;
    type typeVarForm
    type codetree;
    type signatures;
    type functors;
    type env;
    type sigBind and functorBind and structBind
    type machineWord
    type fixStatus
    type location =
        { file: string, startLine: FixedInt.int, startPosition: FixedInt.int,
          endLine: FixedInt.int, endPosition: FixedInt.int }
    type topdec
    type program
    type ptProperties
    type exportTree = location * ptProperties list
    type navigation =
        {parent: (unit -> exportTree) option,
         next: (unit -> exportTree) option,
         previous: (unit -> exportTree) option}
    type typeParsetree
    type formalArgStruct
    type sigs

    val mkStructureDec:     structBind list * location -> structDec
    val mkStruct:           structDec list * location -> structValue
    val mkSignatureDec:     sigBind list * location -> topdec;
    val mkFunctorDec:       functorBind list * location -> topdec;
    val mkLocaldec:         structDec list * structDec list * location -> structDec;
    val mkLetdec:           structDec list * structValue * location -> structValue;
    val mkCoreLang:         parsetree * location -> structDec;
    val mkStructureBinding: (string * location) * (sigs * bool * location) option * structValue * location -> structBind
    val mkStructIdent:      string * location -> structValue;
    val mkSignatureBinding: (string * location) * sigs * location -> sigBind;
    val mkFunctorAppl:      string * structValue * location * location -> structValue;
    val mkFormalArg:        string * sigs -> formalArgStruct;
    val mkFunctorBinding:
        string * location * (sigs * bool * location) option * structValue * formalArgStruct * location -> functorBind;
    val mkSigConstraint:    structValue * sigs * bool * location -> structValue
    val mkTopDec:           structDec -> topdec
    val mkProgram:          topdec list * location -> program

    val pass2Structs:   program * lexan * env -> unit;

    val pass4Structs:
        codetree * program ->
            {
                fixes: (string * fixStatus) list, values: (string * values) list,
                structures: (string * structVals) list, signatures: (string * signatures) list,
                functors: (string * functors) list, types: (string* typeConstrSet) list
            };

    val gencodeStructs: program * lexan -> codetree * int

    val displayProgram: program * FixedInt.int -> pretty;

    val structsExportTree: navigation * program -> exportTree

    structure Sharing:
    sig
        type structDec      = structDec
        type structValue    = structValue
        type structVals     = structVals
        type types          = types
        type parsetree      = parsetree
        type lexan          = lexan
        type pretty         = pretty
        type values         = values
        type typeConstrSet  = typeConstrSet
        type codetree       = codetree
        type signatures     = signatures
        type functors       = functors
        type env            = env
        type sigBind        = sigBind
        and  functorBind    = functorBind
        and  structBind     = structBind
        type machineWord    = machineWord
        type fixStatus      = fixStatus
        type topdec         = topdec
        type program        = program
        type typeParsetree  = typeParsetree
        type formalArgStruct= formalArgStruct
        type ptProperties   = ptProperties
        type typeVarForm    = typeVarForm
        type sigs           = sigs
    end
end;