Import Upstream version 20180207
[hcoop/debian/mlton.git] / mlton / atoms / con-.fun
CommitLineData
7f918cf1
CE
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
9functor Con (S: CON_STRUCTS): CON =
10struct
11
12open S
13
14structure C = Id (val noname = "C")
15open C
16
17structure P = PrimCons (C)
18open P
19
20val all = [cons, falsee, nill, reff, truee, bind, match]
21
22fun stats () =
23 let
24 open Layout
25 in
26 align
27 (List.map (all, fn c =>
28 seq [layout c, str " size is ",
29 Int.layout (MLton.size c),
30 str " plist length is ",
31 Int.layout (PropertyList.length (plist c))]))
32 end
33(* quell unused warning *)
34val _ = stats
35
36fun fromBool b = if b then truee else falsee
37
38end