Import Upstream version 20180207
[hcoop/debian/mlton.git] / mlton / elaborate / decs.fun
CommitLineData
7f918cf1
CE
1(* Copyright (C) 1999-2005 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
9functor Decs (S: DECS_STRUCTS): DECS =
10struct
11
12open S
13
14structure Dec = CoreML.Dec
15
16type dec = CoreML.Dec.t
17
18open AppendList
19
20type t = dec t
21
22fun add (ds, d) = append (ds, single d)
23
24fun layout ds =
25 let
26 open Layout
27 in
28 align (Vector.toListMap (toVector ds, Dec.layout))
29 end
30
31end