-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
everything #3
everything #3
Conversation
index.js
Outdated
//. > Identity['@@type'] | ||
//. 'sanctuary-either/Identity' | ||
//. ``` | ||
Identity['@@type'] = 'sanctuary-either/Identity'; |
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.
Typo on the type? I'm guessing 'sanctuary-identity/Identity'
.
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.
Good catch! I'll fix this now. :)
Does this latest commit mean we're ready to merge? 🙏 |
We are getting perilously close, Gabe. ;) I'm not sure whether it's clear from my GitHub activity, but I am steadily making progress towards many of our shared goals. :) |
README.md
Outdated
- [Applicative][] | ||
- [Chain][] | ||
- [Monad][] | ||
- [Alt][] (if `a` satisfies Alt) |
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 believe Identity a
can't depends on a
here, because Alt require kind * -> *
and Identity a
have kind *
.
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.
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 agree. There is instance (Alternative f) => Alternative (IdentityT f)
, but that only works because IdentityT
is * -> * -> *
. IdentityT List String
is distinct from Identity (List String)
.
index.js
Outdated
//. Identity (8) | ||
//. ``` | ||
methods['fantasy-land/ap'] = function(other) { | ||
return Z.map(other.value, this); |
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.
better just apply this directly i guess eg Identity(other.value(this.value))
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.
Good idea. I've made this change. :)
README.md
Outdated
'Identity([1, 2, 3])' | ||
``` | ||
|
||
[Alt]: https://github.com/fantasyland/fantasy-land/tree/v3.2.0#alt |
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.
Same as above, i don't thik Identity
can have Alt
instance.
index.js
Outdated
return Identity(Z.concat(this.value, other.value)); | ||
}; | ||
|
||
//# Identity#fantasy-land/filter :: Filterable f => Identity (f a) ~> (a -> Boolean) -> Identity (f 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 think there is a similar issue to the one with Alt
here. If Identity
implements Filterable
, shouldn't its signature be Identity a ~> (a -> Boolean) -> Identity a
(regardless of whether a
is [String]
or Number
or Maybe Date
)?
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.
Thanks. I have removed Identity#fantasy-land/filter
. :)
I can't find anything else, LGTM :) |
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.
LGTM
index.js
Outdated
var r = next(x); | ||
while (r.tag === next) r = f(next, done, r.value).value; | ||
return Identity(r.value); | ||
}; |
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.
@safareli, does this look right to you?
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.
👍 it looks right
//. . 'Extend ✅ ', | ||
//. . 'Comonad ✅ ', | ||
//. . 'Contravariant ❌ ' ] | ||
//. ``` |
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.
@masaeedu, please review this table.
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.
Looks right to me (for the ones I'm familiar with at least).
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.
This is pretty cool btw. Is it being done across all repos?
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.
Thanks! We're using this approach in three other repositories at the moment:
This is much better than a hard-coded table we would surely forget to update. :)
I'm about to squash the commits. The original commits can be found at |
a5108eb
to
5dd6c6e
Compare
Closes #1
"files"
in package.json