comparison src/tag.sml @ 163:80192edca30d

Datatypes through corify
author Adam Chlipala <adamc@hcoop.net>
date Tue, 29 Jul 2008 13:16:21 -0400
parents f0d3402184d1
children 3bbed533fbd2
comparison
equal deleted inserted replaced
162:06a98129b23f 163:80192edca30d
151 fun tag file = 151 fun tag file =
152 let 152 let
153 val count = foldl (fn ((d, _), count) => 153 val count = foldl (fn ((d, _), count) =>
154 case d of 154 case d of
155 DCon (_, n, _, _) => Int.max (n, count) 155 DCon (_, n, _, _) => Int.max (n, count)
156 | DDatatype (_, n, _) => Int.max (n, count)
156 | DVal (_, n, _, _, _) => Int.max (n, count) 157 | DVal (_, n, _, _, _) => Int.max (n, count)
157 | DValRec vis => foldl (fn ((_, n, _, _, _), count) => Int.max (n, count)) count vis 158 | DValRec vis => foldl (fn ((_, n, _, _, _), count) => Int.max (n, count)) count vis
158 | DExport _ => count) 0 file 159 | DExport _ => count) 0 file
159 160
160 fun doDecl (d as (d', loc), (env, count, tags, byTag)) = 161 fun doDecl (d as (d', loc), (env, count, tags, byTag)) =