diff options
author | Adam Chlipala <adam@chlipala.net> | 2013-04-01 10:13:49 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2013-04-01 10:13:49 -0400 |
commit | 82e400315d526eb6c96fd1ad21a8ce75529f7717 (patch) | |
tree | c7f64cbf8081be1d96a35eb351b0c434aca092b0 /src/mono_util.sml | |
parent | bacf194c5cbeeb8a01b200dc32c5b968f7e62c0f (diff) |
Change Name_js to skip code snippets that depend on the CSRF-protection signature
Diffstat (limited to 'src/mono_util.sml')
-rw-r--r-- | src/mono_util.sml | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/mono_util.sml b/src/mono_util.sml index 61638858..116dfa64 100644 --- a/src/mono_util.sml +++ b/src/mono_util.sml @@ -1,4 +1,4 @@ -(* Copyright (c) 2008, Adam Chlipala +(* Copyright (c) 2008, 2013, Adam Chlipala * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -654,6 +654,25 @@ fun foldMapB {typ, exp, decl, bind} ctx s d = S.Continue v => v | S.Return _ => raise Fail "MonoUtil.Decl.foldMapB: Impossible" +fun exists {typ, exp, decl} k = + case mapfold {typ = fn c => fn () => + if typ c then + S.Return () + else + S.Continue (c, ()), + exp = fn e => fn () => + if exp e then + S.Return () + else + S.Continue (e, ()), + decl = fn d => fn () => + if decl d then + S.Return () + else + S.Continue (d, ())} k () of + S.Return _ => true + | S.Continue _ => false + end structure File = struct |