-
-
Notifications
You must be signed in to change notification settings - Fork 502
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
1.0.0 #312
Conversation
Ok, published on npm
Except fp-ts, the other packages should NOT have API breaking changes |
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.
Should 1.0-rc briefly describe the breaking changes in readme?
Those releases are mainly for early feedback, I'm waiting to update the documentation when things settle down and we are satisfied by the result. Namely
Conversely |
@gcanti Here I will consolidate the issues I encounter: Problem with Either predicates. Previous version: import { either } from 'fp-ts'
...
arrayOfEithers
.filter(either.isRight) // predicate
.map(x => ...) // x is Right<..> :) New version: arrayOfEithers
.filter(x => x.isRight()) // predicate refines x
.map(x => ...) // x is Either<..> :( We're missing a top level support: export const isRight = <A, B>(x: either.Either<A, B>): x is either.Right<A, B> =>
x.isRight() Note that the same reasoning applies to other Sum types.. (Option, These, ..) |
@sledorze I would argue that using In PureScript for example you can't use data Either l r = Left l | Right r
x :: Right String -- doesn't compile
x = Right "foo"
x :: Either Number String -- ok
x = Right "foo" p.s. Also in your particular case there's |
@gcanti this is not on an array but on (rxjs) observables the use case is not easy without those refinements (sorry for having over simplified the example). |
@gcanti
But on Apply that's not the case:
is it deliberate? (if so, why?) |
PureScript is my reference when it comes to establish what's good and what's bad, in particular with respect to functional programming. However if there is consensus I'm ok to re-add those custom guards because
|
Ok anyway i m adding the missing bits into a file so that we can review it later. |
Based on my early experiments there's no gain in terms of type inference / suggestions by swapping the |
@gcanti i was specifically thinking about approachability by homogeneity (if not, wondering what s the default/preferred behavior) |
@gcanti I find we lack meaningful definition for Ordering (I miss LT, EQ, GT) even if they map to -1, 0, 1 in the end. |
@gcanti Ok so I've ported our code base on the new version. Notable:
Overall, I would consider this version as ready for usage. |
@gcanti oh I forgot to say that io-ts-types are not referencing the new libs explicitly. |
@sledorze great feedback, thanks
ok I'm going to re-add them (*)
you can import
My plan would be
|
UPDATE I'm working on a bunch of PRs, the goal would be to coordinate all releases in one shot. Here's the dependencies
You can install the current candidates by running
(for these kind of tests / quick feedback installing from github looks more practical than publishing on npm) Let me know if you hit any issue |
Ok, got no issue so far (but was not able to test with your latest changes - aka type guards - as they've not been published yet). |
@sledorze make sure to install fp-ts by running |
@raveclassic @sledorze
Changelog: see commits
Try:
npm i gcanti/fp-ts#next