Mercurial > urweb
comparison src/explify.sml @ 460:d34834af4512
Cookies through explify
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 06 Nov 2008 10:43:48 -0500 |
parents | 89f766f19d5b |
children | ae03d09043c1 |
comparison
equal
deleted
inserted
replaced
459:f542bc3133dc | 460:d34834af4512 |
---|---|
135 (x, n, Option.map explifyCon co)) xncs), loc) | 135 (x, n, Option.map explifyCon co)) xncs), loc) |
136 | L.SgiVal (x, n, c) => SOME (L'.SgiVal (x, n, explifyCon c), loc) | 136 | L.SgiVal (x, n, c) => SOME (L'.SgiVal (x, n, explifyCon c), loc) |
137 | L.SgiStr (x, n, sgn) => SOME (L'.SgiStr (x, n, explifySgn sgn), loc) | 137 | L.SgiStr (x, n, sgn) => SOME (L'.SgiStr (x, n, explifySgn sgn), loc) |
138 | L.SgiSgn (x, n, sgn) => SOME (L'.SgiSgn (x, n, explifySgn sgn), loc) | 138 | L.SgiSgn (x, n, sgn) => SOME (L'.SgiSgn (x, n, explifySgn sgn), loc) |
139 | L.SgiConstraint _ => NONE | 139 | L.SgiConstraint _ => NONE |
140 | L.SgiTable (nt, x, n, c) => SOME (L'.SgiTable (nt, x, n, explifyCon c), loc) | |
141 | L.SgiSequence (nt, x, n) => SOME (L'.SgiSequence (nt, x, n), loc) | |
142 | L.SgiClassAbs (x, n) => SOME (L'.SgiConAbs (x, n, (L'.KArrow ((L'.KType, loc), (L'.KType, loc)), loc)), loc) | 140 | L.SgiClassAbs (x, n) => SOME (L'.SgiConAbs (x, n, (L'.KArrow ((L'.KType, loc), (L'.KType, loc)), loc)), loc) |
143 | L.SgiClass (x, n, c) => SOME (L'.SgiCon (x, n, (L'.KArrow ((L'.KType, loc), (L'.KType, loc)), loc), | 141 | L.SgiClass (x, n, c) => SOME (L'.SgiCon (x, n, (L'.KArrow ((L'.KType, loc), (L'.KType, loc)), loc), |
144 explifyCon c), loc) | 142 explifyCon c), loc) |
145 | 143 |
146 and explifySgn (sgn, loc) = | 144 and explifySgn (sgn, loc) = |
173 | L.DTable (nt, x, n, c) => SOME (L'.DTable (nt, x, n, explifyCon c), loc) | 171 | L.DTable (nt, x, n, c) => SOME (L'.DTable (nt, x, n, explifyCon c), loc) |
174 | L.DSequence (nt, x, n) => SOME (L'.DSequence (nt, x, n), loc) | 172 | L.DSequence (nt, x, n) => SOME (L'.DSequence (nt, x, n), loc) |
175 | L.DClass (x, n, c) => SOME (L'.DCon (x, n, | 173 | L.DClass (x, n, c) => SOME (L'.DCon (x, n, |
176 (L'.KArrow ((L'.KType, loc), (L'.KType, loc)), loc), explifyCon c), loc) | 174 (L'.KArrow ((L'.KType, loc), (L'.KType, loc)), loc), explifyCon c), loc) |
177 | L.DDatabase s => SOME (L'.DDatabase s, loc) | 175 | L.DDatabase s => SOME (L'.DDatabase s, loc) |
176 | L.DCookie (nt, x, n, c) => SOME (L'.DCookie (nt, x, n, explifyCon c), loc) | |
178 | 177 |
179 and explifyStr (str, loc) = | 178 and explifyStr (str, loc) = |
180 case str of | 179 case str of |
181 L.StrConst ds => (L'.StrConst (List.mapPartial explifyDecl ds), loc) | 180 L.StrConst ds => (L'.StrConst (List.mapPartial explifyDecl ds), loc) |
182 | L.StrVar n => (L'.StrVar n, loc) | 181 | L.StrVar n => (L'.StrVar n, loc) |