diff options
author | Ziv Scully <ziv@mit.edu> | 2015-09-13 17:02:17 -0400 |
---|---|---|
committer | Ziv Scully <ziv@mit.edu> | 2015-09-13 17:02:17 -0400 |
commit | 68879bbb4bf58e4709c96ba6904071ce5d24a906 (patch) | |
tree | 163346ebe21b265592fb687e4f55af494880e15c /src/mono_util.sml | |
parent | 46fe4e62ddefd8f79f4a29f7a273f585436d3c85 (diff) |
Make Mono.file a record for readability upon extension.
Diffstat (limited to 'src/mono_util.sml')
-rw-r--r-- | src/mono_util.sml | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mono_util.sml b/src/mono_util.sml index ba10ad32..64aeb318 100644 --- a/src/mono_util.sml +++ b/src/mono_util.sml @@ -695,9 +695,9 @@ fun mapfoldB (all as {bind, ...}) = 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 @@ fun mapfoldB (all as {bind, ...}) = | 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 @@ fun maxName (f : file) = | 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 @@ fun appLoc f (fl : file) = | PolUpdate e1 => eal e1 | PolSequence e1 => eal e1 in - app appl (#1 fl) + app appl (#decls fl) end end |