comparison src/elaborate.sml @ 271:42dfb0d61cf0

'database' declaration threaded through compiler
author Adam Chlipala <adamc@hcoop.net>
date Tue, 02 Sep 2008 10:51:41 -0400
parents e52243e20858
children fdd7a698be01
comparison
equal deleted inserted replaced
270:b9b02613c0c2 271:42dfb0d61cf0
2359 | L'.DFfiStr (x, n, sgn) => [(L'.SgiStr (x, n, sgn), loc)] 2359 | L'.DFfiStr (x, n, sgn) => [(L'.SgiStr (x, n, sgn), loc)]
2360 | L'.DConstraint cs => [(L'.SgiConstraint cs, loc)] 2360 | L'.DConstraint cs => [(L'.SgiConstraint cs, loc)]
2361 | L'.DExport _ => [] 2361 | L'.DExport _ => []
2362 | L'.DTable (tn, x, n, c) => [(L'.SgiTable (tn, x, n, c), loc)] 2362 | L'.DTable (tn, x, n, c) => [(L'.SgiTable (tn, x, n, c), loc)]
2363 | L'.DClass (x, n, c) => [(L'.SgiClass (x, n, c), loc)] 2363 | L'.DClass (x, n, c) => [(L'.SgiClass (x, n, c), loc)]
2364 | L'.DDatabase _ => []
2364 2365
2365 fun sgiBindsD (env, denv) (sgi, _) = 2366 fun sgiBindsD (env, denv) (sgi, _) =
2366 case sgi of 2367 case sgi of
2367 L'.SgiConstraint (c1, c2) => 2368 L'.SgiConstraint (c1, c2) =>
2368 (case D.assert env denv (c1, c2) of 2369 (case D.assert env denv (c1, c2) of
3107 val env = E.pushClass env n 3108 val env = E.pushClass env n
3108 in 3109 in
3109 checkKind env c' ck k; 3110 checkKind env c' ck k;
3110 ([(L'.DClass (x, n, c'), loc)], (env, denv, [])) 3111 ([(L'.DClass (x, n, c'), loc)], (env, denv, []))
3111 end 3112 end
3113
3114 | L.DDatabase s => ([(L'.DDatabase s, loc)], (env, denv, []))
3112 in 3115 in
3113 r 3116 r
3114 end 3117 end
3115 3118
3116 and elabStr (env, denv) (str, loc) = 3119 and elabStr (env, denv) (str, loc) =