Import Upstream version 20180207
[hcoop/debian/mlton.git] / mlton / ast / ast-mlbs.sig
1 (* Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 * Copyright (C) 1997-2000 NEC Research Institute.
4 *
5 * MLton is released under a BSD-style license.
6 * See the file MLton-LICENSE for details.
7 *)
8
9 signature AST_MLBS_STRUCTS =
10 sig
11 include AST_ATOMS_STRUCTS
12 end
13
14 signature AST_MLBS =
15 sig
16 include AST_PROGRAMS
17
18 structure Basexp:
19 sig
20 type basdec
21
22 type t
23 datatype node =
24 Bas of basdec
25 | Let of basdec * t
26 | Var of Basid.t
27
28 include WRAPPED sharing type node' = node
29 sharing type obj = t
30
31 val layout: t -> Layout.t
32 end
33
34 structure Basdec:
35 sig
36 type t
37 datatype node =
38 Ann of string * Region.t * t
39 | Basis of {name: Basid.t, def: Basexp.t} vector
40 | Defs of ModIdBind.t
41 | Local of t * t
42 | MLB of {fileAbs: File.t, fileUse: File.t} * t Promise.t
43 | Open of Basid.t vector
44 | Prim
45 | Prog of {fileAbs: File.t, fileUse: File.t} * Program.t Promise.t
46 | Seq of t list
47
48 include WRAPPED sharing type node' = node
49 sharing type obj = t
50
51 val empty: t
52 val seq: t list -> t
53
54 val checkSyntax: t -> unit
55 val layout: t -> Layout.t
56 val sourceFiles: t -> File.t vector
57 end
58 sharing type Basdec.t = Basexp.basdec
59 end