Lift out partition-kws
function into util module
original commit: 97fe6b82b4ff6d781fe214e3b12500f10587c69e
This commit is contained in:
parent
6a9b828018
commit
502aac42fe
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user