commit 7c365a217c3d31a26c9a8eee754f9f95ecc51dde
parent c76663a68930e4832a680b3c49ad4bb07d5af571
Author: Georges Dupéron <georges.duperon@gmail.com>
Date: Sun, 29 Jan 2017 20:05:21 +0100
Renamed has-*-scopes?
Diffstat:
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/main.rkt b/main.rkt
@@ -21,8 +21,8 @@
intdef-scope?
local-scope?
top-scope?
- has-all-scopes?
- has-any-scope?)
+ all-scopes-in?
+ any-scope-in?)
(define scopes/c
(->* (syntax?) ([or/c 'add 'remove 'flip]) syntax?))
@@ -116,10 +116,10 @@
(-> (and/c (or/c syntax? scopes/c) single-scope?) boolean?)
(eq? (scope-kind sc) 'top))
-(define/contract (has-all-scopes? sc1 sc2)
+(define/contract (all-scopes-in? sc1 sc2)
(-> (or/c syntax? scopes/c) (or/c syntax? scopes/c) boolean?)
(zero-scopes? (scopes-remove sc2 sc1)))
-(define/contract (has-any-scope? sc1 sc2)
+(define/contract (any-scope-in? sc1 sc2)
(-> (or/c syntax? scopes/c) (or/c syntax? scopes/c) boolean?)
(not (zero-scopes? (scopes-intersect sc1 sc2))))
diff --git a/scribblings/scope-operations.scrbl b/scribblings/scope-operations.scrbl
@@ -106,12 +106,12 @@
@defproc[(top-scope? [sc (and/c (or/c syntax? scopes/c) single-scope?)])
boolean?]{A shorthand for @racket[(eq? (scope-kind sc) 'top)]}
-@defproc[(has-all-scopes? [sc1 (or/c syntax? scopes/c)]
+@defproc[(all-scopes-in? [sc1 (or/c syntax? scopes/c)]
[sc2 (or/c syntax? scopes/c)]) boolean?]{
Predicate which returns @racket[#true] iff all the scopes contained within the
set of scopes @racket[sc1] are present in the set of scopes @racket[sc2].}
-@defproc[(has-any-scope? [sc1 (or/c syntax? scopes/c)]
+@defproc[(any-scope-in? [sc1 (or/c syntax? scopes/c)]
[sc2 (or/c syntax? scopes/c)]) boolean?]{
Predicate which returns @racket[#true] iff any of the scopes contained within
the set of scopes @racket[sc1] are present in the set of scopes @racket[sc2].}
\ No newline at end of file