Import Debian changes 20180207-1
[hcoop/debian/mlton.git] / mlton / atoms / tycon-kind.fun
CommitLineData
7f918cf1
CE
1(* Copyright (C) 2003-2006, 2008 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 *
4 * MLton is released under a BSD-style license.
5 * See the file MLton-LICENSE for details.
6 *)
7
8functor TyconKind (S: TYCON_KIND_STRUCTS): TYCON_KIND =
9struct
10
11open S
12
13datatype t =
14 Arity of int
15 | Nary
16
17val layout =
18 fn Arity n => Int.layout n
19 | Nary => Layout.str "n-ary"
20
21val equals =
22 fn (Arity n, Arity n') => n = n'
23 | (Nary, Nary) => true
24 | _ => false
25
26val equals = Trace.trace2 ("TyconKind.equals", layout, layout, Bool.layout) equals
27
28end