Coverage report: /home/runner/work/geb/geb/src/geb/list.lisp
Kind | Covered | All | % |
expression | 19 | 91 | 20.9 |
branch | 0 | 0 | nil |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
3
(defparameter *nil* (alias nil (so1)))
5
(defparameter *cons-type* (reference 'cons))
9
(coprod *nil* *cons-type*)))
11
;; we should register this somewhere for checking if we care
12
(defparameter *canonical-cons-type*
14
(prod geb-bool:bool *list*)))
18
(opaque-morph (prod geb-bool:bool *list*)
23
(opaque-morph (<-left geb-bool:bool *list*)
28
(opaque-morph (<-right geb-bool:bool *list*)
32
(->right *nil* *cons-type*))
35
(->left *nil* *cons-type*))
37
(defun cons-on-list (terminal-morphism)
38
"Cons an element onto a list, assuming our value can be created from
40
(comp *cons* (pair (comp terminal-morphism (terminal *list*))
44
;; let the optimizer handle this
45
(defun cons-on-nil (terminal-morphism)
46
"Cons an element onto a nil, assuming our value can be created from
48
(comp (cons-on-list terminal-morphism)
51
;; let the optimizer handle this
52
(defun cons-on-cons (terminal-morphism)
53
"Cons an element onto a cons, assuming our value can be created from
55
(comp (cons-on-list terminal-morphism)
59
(comp (mcase nil->list
60
(comp cons->list (cons-on-cons geb-bool:true)))
63
(def silly-example-cdring
64
(comp (cons-on-cons geb-bool:false)
65
(mcase (cons-on-nil geb-bool:true)
67
*cdr* (cons-on-list geb-bool:true) *cdr*))