Import Debian changes 20180207-1
[hcoop/debian/mlton.git] / mlton / atoms / unary-tycon.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 UnaryTycon(S: UNARY_TYCON_STRUCTS): UNARY_TYCON =
10struct
11
12open S
13
14datatype t = Ref | Array | Vector
15
16val toTycon =
17 fn Ref => Tycon.reff
18 | Array => Tycon.array
19 | Vector => Tycon.vector
20
21val toString =
22 fn Ref => "Ref"
23 | Array => "Array"
24 | Vector => "Vector"
25
26val equals: t * t -> bool = op =
27
28val layout = Layout.str o toString
29
30end