comparison src/expl_util.sml @ 198:ab86aa858e6c

'Option' datatype encoding
author Adam Chlipala <adamc@hcoop.net>
date Sat, 09 Aug 2008 19:23:31 -0400
parents aa54250f58ac
children 0343557355fc
comparison
equal deleted inserted replaced
197:b1b9bcfd8c42 198:ab86aa858e6c
26 *) 26 *)
27 27
28 structure ExplUtil :> EXPL_UTIL = struct 28 structure ExplUtil :> EXPL_UTIL = struct
29 29
30 open Expl 30 open Expl
31
32 fun classifyDatatype xncs =
33 if List.all (fn (_, _, NONE) => true | _ => false) xncs then
34 Enum
35 else
36 Default
37 31
38 structure S = Search 32 structure S = Search
39 33
40 structure Kind = struct 34 structure Kind = struct
41 35