diff options
| author | Arun Isaac | 2025-09-30 23:56:49 +0100 |
|---|---|---|
| committer | Arun Isaac | 2025-11-16 22:43:00 +0000 |
| commit | 5043c7231249baba949504de285d0ea0199a531b (patch) | |
| tree | 4179392c06323e565cd9311675ec9b1fd7d569b2 | |
| parent | 0ff48dd263e3228b74b92122dc03fa539b3c6d98 (diff) | |
| download | ravanan-5043c7231249baba949504de285d0ea0199a531b.tar.gz ravanan-5043c7231249baba949504de285d0ea0199a531b.tar.lz ravanan-5043c7231249baba949504de285d0ea0199a531b.zip | |
work/types: Rename <union-type> to <cwl-union-type>.
<cwl-union-type> is more consistent with <cwl-array-type>.
| -rw-r--r-- | ravanan/work/command-line-tool.scm | 10 | ||||
| -rw-r--r-- | ravanan/work/types.scm | 16 |
2 files changed, 13 insertions, 13 deletions
diff --git a/ravanan/work/command-line-tool.scm b/ravanan/work/command-line-tool.scm index 6891770..0d9bcea 100644 --- a/ravanan/work/command-line-tool.scm +++ b/ravanan/work/command-line-tool.scm @@ -130,9 +130,9 @@ example, when @var{type} is a union type." (vector->list obj)) type)) ;; Match any one of the subtypes of the union type. - ((union-type? type) + ((cwl-union-type? type) (any (cut match-type obj <>) - (union-type-subtypes type))) + (cwl-union-type-subtypes type))) ;; Else, match the exact type of the object. (else (and (eq? (object-type obj) @@ -172,9 +172,9 @@ example, when @var{type} is a union type." (cwl-array-type-subtype type))) matches) type)) - ((union-type? type) + ((cwl-union-type? type) (any (cut glob-match-type matches <>) - (union-type-subtypes type))))) + (cwl-union-type-subtypes type))))) ;; TODO: Support all types. (define (formal-parameter-type type) @@ -182,7 +182,7 @@ example, when @var{type} is a union type." (cond ;; Union types ((vector? type) - (apply union-type + (apply cwl-union-type (map formal-parameter-type (vector->list type)))) ;; Other types ((string? type) diff --git a/ravanan/work/types.scm b/ravanan/work/types.scm index 2defb6d..ca49c33 100644 --- a/ravanan/work/types.scm +++ b/ravanan/work/types.scm @@ -18,12 +18,12 @@ (define-module (ravanan work types) #:use-module (srfi srfi-9 gnu) - union-type - union-type? - union-type-subtypes)) #:export (cwl-array-type cwl-array-type? cwl-array-type-subtype + cwl-union-type + cwl-union-type? + cwl-union-type-subtypes)) (define-immutable-record-type <cwl-array-type> (cwl-array-type subtype) @@ -31,9 +31,9 @@ (subtype cwl-array-type-subtype)) (define-immutable-record-type <union-type> - (-union-type subtypes) - union-type? - (subtypes union-type-subtypes)) + (-cwl-union-type subtypes) + cwl-union-type? + (subtypes cwl-union-type-subtypes)) -(define (union-type . subtypes) - (-union-type subtypes)) +(define (cwl-union-type . subtypes) + (-cwl-union-type subtypes)) |
