comparison src/tag.sml @ 179:3bbed533fbd2

Cases through monoize
author Adam Chlipala <adamc@hcoop.net>
date Sun, 03 Aug 2008 10:48:36 -0400
parents 80192edca30d
children fdd7a698be01
comparison
equal deleted inserted replaced
178:eb3f9913bf31 179:3bbed533fbd2
148 148
149 fun decl (d, s) = (d, s) 149 fun decl (d, s) = (d, s)
150 150
151 fun tag file = 151 fun tag file =
152 let 152 let
153 val count = foldl (fn ((d, _), count) => 153 val count = U.File.maxName file
154 case d of
155 DCon (_, n, _, _) => Int.max (n, count)
156 | DDatatype (_, n, _) => Int.max (n, count)
157 | DVal (_, n, _, _, _) => Int.max (n, count)
158 | DValRec vis => foldl (fn ((_, n, _, _, _), count) => Int.max (n, count)) count vis
159 | DExport _ => count) 0 file
160 154
161 fun doDecl (d as (d', loc), (env, count, tags, byTag)) = 155 fun doDecl (d as (d', loc), (env, count, tags, byTag)) =
162 case d' of 156 case d' of
163 DExport (ek, n) => 157 DExport (ek, n) =>
164 let 158 let