comparison src/explify.sml @ 271:42dfb0d61cf0

'database' declaration threaded through compiler
author Adam Chlipala <adamc@hcoop.net>
date Tue, 02 Sep 2008 10:51:41 -0400
parents 3aa010e97db9
children 9601c717d2f3
comparison
equal deleted inserted replaced
270:b9b02613c0c2 271:42dfb0d61cf0
162 | L.DConstraint (c1, c2) => NONE 162 | L.DConstraint (c1, c2) => NONE
163 | L.DExport (en, sgn, str) => SOME (L'.DExport (en, explifySgn sgn, explifyStr str), loc) 163 | L.DExport (en, sgn, str) => SOME (L'.DExport (en, explifySgn sgn, explifyStr str), loc)
164 | L.DTable (nt, x, n, c) => SOME (L'.DTable (nt, x, n, explifyCon c), loc) 164 | L.DTable (nt, x, n, c) => SOME (L'.DTable (nt, x, n, explifyCon c), loc)
165 | L.DClass (x, n, c) => SOME (L'.DCon (x, n, 165 | L.DClass (x, n, c) => SOME (L'.DCon (x, n,
166 (L'.KArrow ((L'.KType, loc), (L'.KType, loc)), loc), explifyCon c), loc) 166 (L'.KArrow ((L'.KType, loc), (L'.KType, loc)), loc), explifyCon c), loc)
167 | L.DDatabase s => SOME (L'.DDatabase s, loc)
167 168
168 and explifyStr (str, loc) = 169 and explifyStr (str, loc) =
169 case str of 170 case str of
170 L.StrConst ds => (L'.StrConst (List.mapPartial explifyDecl ds), loc) 171 L.StrConst ds => (L'.StrConst (List.mapPartial explifyDecl ds), loc)
171 | L.StrVar n => (L'.StrVar n, loc) 172 | L.StrVar n => (L'.StrVar n, loc)