1 (* Copyright (C) 2009,2015,2017 Matthew Fluet.
2 * Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
3 * Jagannathan, and Stephen Weeks.
4 * Copyright (C) 1997-2000 NEC Research Institute.
6 * MLton is released under a BSD-style license.
7 * See the file MLton-LICENSE for details.
10 signature MATCH_COMPILE_STRUCTS =
17 val deTuple: t -> t vector
18 val equals: t * t -> bool
19 val layout: t -> Layout.t
21 val word: WordSize.t -> t
28 val con: {arg: (Var.t * Type.t) option,
31 targs: Type.t vector} vector -> t
32 val word: WordSize.t * (WordX.t * exp) vector -> t
40 default: (t * Region.t) option,
42 ty: Type.t} (* type of entire case expression *)
44 val const: Const.t -> t
46 val detuple: {tuple: t,
47 body: (Var.t * Type.t) vector -> t} -> t
48 val devector: {vector: t, length: int,
49 body: (Var.t * Type.t) vector -> t} -> t
51 val iff: {test: t, thenn: t, elsee: t, ty: Type.t} -> t
52 val lett: {var: Var.t, exp: t, body: t} -> t
53 val var: Var.t * Type.t -> t
54 val vectorLength: t -> t
56 sharing type Cases.exp = Exp.t
57 structure NestedPat: NESTED_PAT
58 sharing Atoms = NestedPat.Atoms
59 sharing Type = NestedPat.Type
62 signature MATCH_COMPILE =
64 include MATCH_COMPILE_STRUCTS
67 {caseType: Type.t, (* type of entire expression *)
68 cases: (NestedPat.t * (int -> (Var.t -> Var.t) -> Exp.t)) vector,
69 conTycon: Con.t -> Tycon.t,
73 tyconCons: Tycon.t -> {con: Con.t, hasArg: bool} vector}
74 -> Exp.t * ({dropOnlyExns: bool} -> Layout.t option)