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