Lift out partition-kws function into util module

original commit: 97fe6b82b4ff6d781fe214e3b12500f10587c69e
This commit is contained in:
Asumu Takikawa 2014-01-07 18:33:36 -05:00
parent 6a9b828018
commit 502aac42fe
2 changed files with 7 additions and 2 deletions

View File

@ -9,7 +9,7 @@
(utils tc-utils)
(env type-name-env)
(rep rep-utils)
(types resolve union utils)
(types resolve union utils kw-types)
(prefix-in t: (types abbrev numeric-tower))
(private parse-type syntax-properties)
racket/match racket/syntax racket/list

View File

@ -275,4 +275,9 @@
(make-PolyDots names (loop f))]
[t t]))))
(provide kw-convert kw-unconvert opt-convert)
;; partition-kws : (Listof Keyword) -> (values (Listof Keyword) (Listof Keyword))
;; Partition keywords by whether they are mandatory or not
(define (partition-kws kws)
(partition (match-lambda [(Keyword: _ _ mand?) mand?]) kws))
(provide kw-convert kw-unconvert opt-convert partition-kws)