diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-07-17 10:23:04 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-07-17 10:23:04 -0400 |
commit | e3313edc92a73932ff57b1c803fe7e408283406f (patch) | |
tree | 285b8ca2c5c71dfb0c48b0b8e56727cf37592129 /src/shake.sml | |
parent | 1e03bdf0b6f423870abcf5e54ae7f2bdf08e3e49 (diff) |
Corifying (non-mutual) 'val rec'
Diffstat (limited to 'src/shake.sml')
-rw-r--r-- | src/shake.sml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shake.sml b/src/shake.sml index b7ce58d7..038dc8f9 100644 --- a/src/shake.sml +++ b/src/shake.sml @@ -49,6 +49,8 @@ fun shake file = val (cdef, edef) = foldl (fn ((DCon (_, n, _, c), _), (cdef, edef)) => (IM.insert (cdef, n, c), edef) | ((DVal (_, n, t, e, _), _), (cdef, edef)) => (cdef, IM.insert (edef, n, (t, e))) + | ((DValRec vis, _), (cdef, edef)) => + (cdef, foldl (fn ((_, n, t, e, _), edef) => IM.insert (edef, n, (t, e))) edef vis) | ((DExport _, _), acc) => acc) (IM.empty, IM.empty) file @@ -99,6 +101,7 @@ fun shake file = in List.filter (fn (DCon (_, n, _, _), _) => IS.member (#con s, n) | (DVal (_, n, _, _, _), _) => IS.member (#exp s, n) + | (DValRec vis, _) => List.exists (fn (_, n, _, _, _) => IS.member (#exp s, n)) vis | (DExport _, _) => true) file end |