-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.lisp
46 lines (36 loc) · 1.42 KB
/
types.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
;;;; types.lisp --- Types used in the rsbag system.
;;;;
;;;; Copyright (C) 2011-2018 Jan Moringen
;;;;
;;;; Author: Jan Moringen <[email protected]>
(cl:in-package #:rsbag)
;;; Bag opening and entry reading/writing options
(deftype direction ()
"Values of this type are used to indicate whether a bag should be
opened for reading, writing or both."
'(member :input :output :io))
(deftype if-does-not-exist-policy ()
"Possible actions to execute if a requested object does not exist."
'(member nil :error))
(deftype if-exists-policy ()
"Possible actions to execute if an object should be stored in
location that is already occupied."
'(member :error :supersede))
;;; Transformation specifications
(deftype transform-spec/default ()
"This transform specification causes the default transformation to
be applied."
'null)
(deftype transform-spec/augment ()
"This transform specification causes supplied arguments to be
appended when the default transformation is constructed."
'(cons (eql &from-source) list))
(deftype transform-spec/full ()
"This transform specification cases the a specific transform to be
constructed with supplied arguments without automatic derivation."
'(cons (and symbol (not (eql &from-source))) list))
(deftype transform-spec ()
"All forms of transform specifications."
'(or transform-spec/default
transform-spec/augment
transform-spec/full))