Splat a bunch of modules from elsewhere.
This commit is contained in:
parent
7d728559d0
commit
1b950264d1
11 changed files with 3861 additions and 376 deletions
43
modules/goblins/abstract-types.scm
Normal file
43
modules/goblins/abstract-types.scm
Normal file
|
@ -0,0 +1,43 @@
|
|||
;;; Copyright 2023 Jessica Tallon
|
||||
;;;
|
||||
;;; Licensed under the Apache License, Version 2.0 (the "License");
|
||||
;;; you may not use this file except in compliance with the License.
|
||||
;;; You may obtain a copy of the License at
|
||||
;;;
|
||||
;;; http://www.apache.org/licenses/LICENSE-2.0
|
||||
;;;
|
||||
;;; Unless required by applicable law or agreed to in writing, software
|
||||
;;; distributed under the License is distributed on an "AS IS" BASIS,
|
||||
;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
;;; See the License for the specific language governing permissions and
|
||||
;;; limitations under the License.
|
||||
(define-module (goblins abstract-types)
|
||||
#:export (zilch
|
||||
zilch?
|
||||
|
||||
<tagged>
|
||||
make-tagged
|
||||
make-tagged*
|
||||
tagged?
|
||||
tagged-label
|
||||
tagged-data))
|
||||
|
||||
;; This is both a 2nd and secondary "bottom" or null/void type that's used
|
||||
;; within CapTP. This works alongside guile's *unspecified* bottom type.
|
||||
(define (make-zilch)
|
||||
(define-record-type <zilch>
|
||||
(_make-zilch)
|
||||
zilch?)
|
||||
(values (_make-zilch) zilch?))
|
||||
|
||||
(define-values (zilch zilch?)
|
||||
(make-zilch))
|
||||
|
||||
(define-record-type <tagged>
|
||||
(make-tagged label data)
|
||||
tagged?
|
||||
(label tagged-label)
|
||||
(data tagged-data))
|
||||
|
||||
(define (make-tagged* label . args)
|
||||
(make-tagged label args))
|
Loading…
Add table
Add a link
Reference in a new issue