Import Debian changes 20180207-1
[hcoop/debian/mlton.git] / mlton / ssa / three-point-lattice.fun
CommitLineData
7f918cf1
CE
1(* Copyright (C) 1999-2006 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 ThreePointLattice(S: THREE_POINT_LATTICE_STRUCTS): THREE_POINT_LATTICE =
10struct
11
12open S
13
14structure L = NPointLattice(val names = [bottom, mid, top])
15open L
16
17val isBottom = fn x => isN (x, 0)
18val isMid = fn x => isN (x, 1)
19val isTop = fn x => isN (x, 2)
20val makeMid = fn x => makeN (x, 1)
21val makeTop = fn x => makeN (x, 2)
22val whenMid = fn (x, h) => whenN (x, 1, h)
23val whenTop = fn (x, h) => whenN (x, 2, h)
24end