diff options
author | Adam Chlipala <adam@chlipala.net> | 2010-09-07 08:28:07 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2010-09-07 08:28:07 -0400 |
commit | 5545969f485ef2fb944db8e7b0237acbabeb8d4c (patch) | |
tree | ab4a39c6f88b3e8719c9e41dfcd7f147126ef790 /src/shake.sml | |
parent | ee175ea1f9151123e47d9cbfee0c6329b2e5d934 (diff) |
Server-side 'onError'
Diffstat (limited to 'src/shake.sml')
-rw-r--r-- | src/shake.sml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/shake.sml b/src/shake.sml index bc81def9..096c31fd 100644 --- a/src/shake.sml +++ b/src/shake.sml @@ -101,6 +101,11 @@ fun shake file = st else usedVars st e1 + | ((DOnError n, _), st as (usedE, usedC)) => + if !sliceDb then + st + else + (IS.add (usedE, n), usedC) | (_, acc) => acc) (IS.empty, IS.empty) file val (cdef, edef) = foldl (fn ((DCon (_, n, _, c), _), (cdef, edef)) => (IM.insert (cdef, n, [c]), edef) @@ -128,7 +133,8 @@ fun shake file = | ((DStyle (_, n, _), _), (cdef, edef)) => (cdef, IM.insert (edef, n, ([], dummyt, dummye))) | ((DTask _, _), acc) => acc - | ((DPolicy _, _), acc) => acc) + | ((DPolicy _, _), acc) => acc + | ((DOnError _, _), acc) => acc) (IM.empty, IM.empty) file fun kind (_, s) = s @@ -216,7 +222,8 @@ fun shake file = | (DCookie _, _) => not (!sliceDb) | (DStyle _, _) => not (!sliceDb) | (DTask _, _) => not (!sliceDb) - | (DPolicy _, _) => not (!sliceDb)) file + | (DPolicy _, _) => not (!sliceDb) + | (DOnError _, _) => not (!sliceDb)) file end end |