Import Upstream version 20180207
[hcoop/debian/mlton.git] / mlton / atoms / tycon.fun
CommitLineData
7f918cf1
CE
1(* Copyright (C) 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.
5 *
6 * MLton is released under a BSD-style license.
7 * See the file MLton-LICENSE for details.
8 *)
9
10functor Tycon (S: TYCON_STRUCTS): TYCON =
11struct
12
13open S
14
15structure Id = Id (val noname = "t")
16open Id
17
18structure P = PrimTycons (structure AdmitsEquality = AdmitsEquality
19 structure CharSize = CharSize
20 structure IntSize = IntSize
21 structure Kind = Kind
22 structure RealSize = RealSize
23 structure WordSize = WordSize
24 open Id)
25open P
26
27fun stats () =
28 let
29 open Layout
30 in
31 align
32 (List.map (prims, fn {tycon = c, ...} =>
33 seq [layout c, str " size is ",
34 Int.layout (MLton.size c),
35 str " plist length is ",
36 Int.layout (PropertyList.length (plist c))]))
37 end
38(* quell unused warning *)
39val _ = stats
40
41end