Merged
Conversation
JacquesCarette
requested changes
Dec 16, 2025
Collaborator
JacquesCarette
left a comment
There was a problem hiding this comment.
Very nice. Some picky comments.
|
|
||
| {-# OPTIONS --safe --without-K #-} | ||
|
|
||
| open import Categories.Category |
Collaborator
There was a problem hiding this comment.
please restrict all open import via using. Do use Categories.Category.Core when at top-level just for 'Category'.
| module A = Functor ActionF | ||
|
|
||
| η : ∀ X → X ⇒ A.₀ X | ||
| η X = m.η ⊗₁ id ∘ unitorˡ.to |
Collaborator
There was a problem hiding this comment.
Shorthands has things for unitors and associators; probably best to use them throughout the file.
| Monoid⇒-Monad⇒ : ∀ {m n} → Monoid⇒ m n → Monad⇒-id (ActionM n) (ActionM m) | ||
| Monoid⇒-Monad⇒ {m} {n} f = record | ||
| { α = ntHelper record | ||
| { η = λ X → arr ⊗₁ id |
Collaborator
There was a problem hiding this comment.
do _ names that are not used in the rhs of a lambda.
JacquesCarette
approved these changes
Dec 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #498
I'd like to share the commutative diagrams I made while trying to understand how to implement this:
Associativity:

Left identity:

Right identity:

In the issue I noted that this could be extended to a strong monad transformer - that comes from the fact that any pair of monads with a distributive property compose, which I think should be proven separately.