-
Notifications
You must be signed in to change notification settings - Fork 1
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
Miscellaneous additions #1
Conversation
One big PR is fine. It's easy enough to cherry-pick the commits if necessary. |
Co-authored-by: Daniel Vlasits <dvlasits@gmail.com>
Co-authored-by: Daniel Vlasits <dvlasits@gmail.com>
numbers form many monoids - under addition, multiplication, etc. so it is a bit weird to choose addition arbitrarily as the "canonical" Monoid instance for them
let fmap m (a, b) = (a, m b) | ||
end | ||
|
||
type ('a, 'b) const = Const of 'a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder whether this can be defined simply as
type ('a, 'b) const = Const of 'a | |
type ('a, 'b) const = 'a |
If it does need to be a proper (generative) type, it'd be better as a record, so that it's easy to destruct as well as construct:
type ('a, 'b) const = { const: 'a }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Daniel wants me to merge this so I'm going to make this an issue and deal with it later
For a bunch of small, fairly logically separate, changes like this, is it better to make one big PR like this, or split into many smaller PRs? I thought I'd choose this option so it would be easier to merge, but is that a bad idea because it makes it harder to "pick and choose" changes?