-
Notifications
You must be signed in to change notification settings - Fork 24
Prepare for 2.0 release #18
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
Conversation
|
||
derive instance eqCardinality :: Eq (Cardinality a) | ||
|
||
derive instance ordCardinality :: Eq (Cardinality 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.
You are deriving Eq twice :)
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.
Oops, thanks!
|
||
instance boundedEnumTuple :: (BoundedEnum a, BoundedEnum b) => BoundedEnum (Tuple a b) where | ||
cardinality = | ||
Cardinality | ||
$ runCardinality (cardinality :: Cardinality a) | ||
* runCardinality (cardinality :: Cardinality b) | ||
$ unwrap (cardinality :: Cardinality 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.
Maybe derive Semiring
for Cardinality 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 did consider that... I guess it probably would be cleaner on balance.
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.
Oh right, I did try it in fact, but I remember now: it doesn't help with almost any of these cases since we're combining Cardinality
values with different phantom types
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.
Ah, makes sense.
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.
All good otherwise?
Yes I think so Sent from my iPhone
|
No description provided.