Mercurial > urweb
diff src/mono_util.sml @ 2251:25874084bf1f
Make Mono.file a record for readability upon extension.
author | Ziv Scully <ziv@mit.edu> |
---|---|
date | Sun, 13 Sep 2015 17:02:17 -0400 |
parents | 278e10629ba1 |
children | e843a04499d4 |
line wrap: on
line diff
--- a/src/mono_util.sml Sun Sep 13 16:02:45 2015 -0400 +++ b/src/mono_util.sml Sun Sep 13 17:02:17 2015 -0400 @@ -695,9 +695,9 @@ let val mfd = Decl.mapfoldB all - fun mff ctx (ds, ps) = - case ds of - nil => S.return2 (nil, ps) + fun mff ctx (file : file) = + case #decls file of + nil => S.return2 {decls = nil, sideInfo = #sideInfo file} | d :: ds' => S.bind2 (mfd ctx d, fn d' => @@ -736,9 +736,9 @@ | DPolicy _ => ctx | DOnError _ => ctx in - S.map2 (mff ctx' (ds', ps), - fn (ds', _) => - (d' :: ds', ps)) + S.map2 (mff ctx' {decls = ds', sideInfo = #sideInfo file}, + fn {decls = ds', ...} => + {decls = d' :: ds', sideInfo = #sideInfo file}) end) in mff @@ -791,7 +791,7 @@ | DStyle _ => count | DTask _ => count | DPolicy _ => count - | DOnError _ => count) 0 (#1 f) + | DOnError _ => count) 0 (#decls f) fun appLoc f (fl : file) = let @@ -822,7 +822,7 @@ | PolUpdate e1 => eal e1 | PolSequence e1 => eal e1 in - app appl (#1 fl) + app appl (#decls fl) end end