Commit | Line | Data |
---|---|---|
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 | ||
8 | functor TyconKind (S: TYCON_KIND_STRUCTS): TYCON_KIND = | |
9 | struct | |
10 | ||
11 | open S | |
12 | ||
13 | datatype t = | |
14 | Arity of int | |
15 | | Nary | |
16 | ||
17 | val layout = | |
18 | fn Arity n => Int.layout n | |
19 | | Nary => Layout.str "n-ary" | |
20 | ||
21 | val equals = | |
22 | fn (Arity n, Arity n') => n = n' | |
23 | | (Nary, Nary) => true | |
24 | | _ => false | |
25 | ||
26 | val equals = Trace.trace2 ("TyconKind.equals", layout, layout, Bool.layout) equals | |
27 | ||
28 | end |