Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move width Generic #153

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/geb/trans.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ We use an optimized version in actual code, which happens to compute the same re

(defmethod to-seqn ((obj <substobj>))
"Preserves identity morphims"
(seqn:id (geb.seqn.main:width obj)))
(seqn:id (geb.common:width obj)))

(defmethod to-seqn ((obj geb.extension.spec:<natobj>))
(seqn:id (geb.seqn.main:width obj)))
(seqn:id (geb.common:width obj)))

(defmethod to-seqn ((obj comp))
"Preserves composition"
Expand Down
5 changes: 5 additions & 0 deletions src/generics/generics.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ of [so1][geb.spec:so1]"))
"Takes in X and Y Geb objects and provides an evaluation morphism
(prod (so-hom-obj X Y) X) -> Y"))

(defgeneric width (object)
(:documentation
"Given an OBJECT of Geb presents it as a SeqN object. That is,
width corresponds the object part of the to-seqn functor."))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Conversion functions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand Down
1 change: 1 addition & 0 deletions src/generics/package.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ examples often given in the specific methods"
(well-defp-cat pax:generic-function)
(maybe pax:generic-function)
(so-eval pax:generic-function)
(width pax:generic-function)
(to-circuit pax:generic-function)
(to-bitc pax:generic-function)
(to-seqn pax:generic-function)
Expand Down
1 change: 0 additions & 1 deletion src/seqn/package.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
(seq-max-fill pax:function)
(width (pax:method () (<substobj>)))
(width (pax:method () (<natobj>)))
(width pax:generic-function)
(inj-coprod-parallel pax:function)
(zero-list pax:function)
(dom (pax:method () (<seqn>)))
Expand Down