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

Respect constraints on type class implementations #145

Merged
merged 3 commits into from
Apr 22, 2021
Merged

Conversation

Avaq
Copy link
Member

@Avaq Avaq commented Apr 19, 2021

Closes #144

@Avaq Avaq force-pushed the avaq/constraints branch 4 times, most recently from 9432bc5 to 697565f Compare April 19, 2021 18:01
index.js Outdated Show resolved Hide resolved
@Avaq Avaq force-pushed the avaq/constraints branch 2 times, most recently from d5e9534 to 8996d1c Compare April 19, 2021 18:43
@Avaq Avaq marked this pull request as ready for review April 19, 2021 19:06
@Avaq Avaq force-pushed the avaq/constraints branch from bfe3dac to d7419f6 Compare April 20, 2021 09:15
index.js Outdated
(function() {
var $seen = [];
return function(x) {
// if ($seen.includes (x)) return true;
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this code path can be exercised without the changes in the following commit. I think npm test should pass for every new commit on master, so I commented out this line and uncommented it in the following commit.

index.js Outdated
Comment on lines 297 to 298
// if ($seen.includes (x)) return true;
if ($seen.includes (x)) return true;
Copy link
Member

Choose a reason for hiding this comment

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

I uncommented this line as the code path can now be exercised. :)

Avaq added 2 commits April 21, 2021 20:45
This will be used in the following commit(s).
Now that getPrototypeMethod calls into user functions (via
prototypeMethod), it's possible for these functions to call back
into the same test function with the same value - and they will.
@Avaq
Copy link
Member Author

Avaq commented Apr 21, 2021

Doctests LGTM

@Avaq Avaq merged commit 7b3d0e0 into master Apr 22, 2021
@Avaq Avaq deleted the avaq/constraints branch April 22, 2021 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test methods should respect constraints
2 participants