comparison src/explify.sml @ 246:3aa010e97db9

Explify tables
author Adam Chlipala <adamc@hcoop.net>
date Sun, 31 Aug 2008 08:46:22 -0400
parents 19e5791923d0
children 42dfb0d61cf0
comparison
equal deleted inserted replaced
245:1e24a3e6d614 246:3aa010e97db9
127 (x, n, Option.map explifyCon co)) xncs), loc) 127 (x, n, Option.map explifyCon co)) xncs), loc)
128 | L.SgiVal (x, n, c) => SOME (L'.SgiVal (x, n, explifyCon c), loc) 128 | L.SgiVal (x, n, c) => SOME (L'.SgiVal (x, n, explifyCon c), loc)
129 | L.SgiStr (x, n, sgn) => SOME (L'.SgiStr (x, n, explifySgn sgn), loc) 129 | L.SgiStr (x, n, sgn) => SOME (L'.SgiStr (x, n, explifySgn sgn), loc)
130 | L.SgiSgn (x, n, sgn) => SOME (L'.SgiSgn (x, n, explifySgn sgn), loc) 130 | L.SgiSgn (x, n, sgn) => SOME (L'.SgiSgn (x, n, explifySgn sgn), loc)
131 | L.SgiConstraint _ => NONE 131 | L.SgiConstraint _ => NONE
132 | L.SgiTable _ => raise Fail "Explify SgiTable" 132 | L.SgiTable (nt, x, n, c) => SOME (L'.SgiTable (nt, x, n, explifyCon c), loc)
133 | L.SgiClassAbs (x, n) => SOME (L'.SgiConAbs (x, n, (L'.KArrow ((L'.KType, loc), (L'.KType, loc)), loc)), loc) 133 | L.SgiClassAbs (x, n) => SOME (L'.SgiConAbs (x, n, (L'.KArrow ((L'.KType, loc), (L'.KType, loc)), loc)), loc)
134 | L.SgiClass (x, n, c) => SOME (L'.SgiCon (x, n, (L'.KArrow ((L'.KType, loc), (L'.KType, loc)), loc), 134 | L.SgiClass (x, n, c) => SOME (L'.SgiCon (x, n, (L'.KArrow ((L'.KType, loc), (L'.KType, loc)), loc),
135 explifyCon c), loc) 135 explifyCon c), loc)
136 136
137 and explifySgn (sgn, loc) = 137 and explifySgn (sgn, loc) =
159 | L.DSgn (x, n, sgn) => SOME (L'.DSgn (x, n, explifySgn sgn), loc) 159 | L.DSgn (x, n, sgn) => SOME (L'.DSgn (x, n, explifySgn sgn), loc)
160 | L.DStr (x, n, sgn, str) => SOME (L'.DStr (x, n, explifySgn sgn, explifyStr str), loc) 160 | L.DStr (x, n, sgn, str) => SOME (L'.DStr (x, n, explifySgn sgn, explifyStr str), loc)
161 | L.DFfiStr (x, n, sgn) => SOME (L'.DFfiStr (x, n, explifySgn sgn), loc) 161 | L.DFfiStr (x, n, sgn) => SOME (L'.DFfiStr (x, n, explifySgn sgn), loc)
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 _ => raise Fail "Explify DTable" 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 167
168 and explifyStr (str, loc) = 168 and explifyStr (str, loc) =
169 case str of 169 case str of