Skip to content

Add list monad transformer (for commutative monads)#181

Draft
garrigue wants to merge 4 commits into
masterfrom
list-transformer
Draft

Add list monad transformer (for commutative monads)#181
garrigue wants to merge 4 commits into
masterfrom
list-transformer

Conversation

@garrigue
Copy link
Copy Markdown
Collaborator

This defines the list monad transformer.
Note that it defines a monad only if the base monad is commutative, which suggests that we need a type of commutative monads to make the inference work in practice.

Comment thread theories/core/hierarchy.v
Definition right_id (r : forall A, F A) (op : forall B, F B -> F B -> F B) :=
forall A (m : F A), op _ m (r _) = m.

Definition commutative :=
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This definition is already in monad_lib.v.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But monad_lib.v depends on hierarchy.v.
Should I just move the comment there, and remove the occurrence in monad_lib.v ?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which comment?
Why not move the definition from monad_lib.v to hierarchy.v to avoid the duplicate?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a comment in the header of monad_lib.v relating this definition with Mu's paper.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right, yes the "documentation" should move along.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Speaking of documentation, the "MathComp discipline" is that at least each definition (Definition, mixins, etc.) should be reflected in the header.

Comment thread theories/core/monad_transformer.v Outdated
Comment thread theories/core/monad_transformer.v Outdated
@affeldt-aist
Copy link
Copy Markdown
Owner

the CI error is:

Error:  The compilation of rocq-mathcomp-finmap.2.2.2 failed at "make -j2".

not our fault, maybe transient

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants