Closed kika closed 7 years ago
Some comments above were hidden by commits that made the code they commented on outdated, so you may have to expand a few comment threads above to see my questions on FingerTree, Ordered, and NonEmpty. 😀 Thanks!
Any way I can help?
If you felt like trying to pick this up again and address the remaining comments, that would certainly help :) unfortunately GitHub has hidden a few diff comment threads that still need addressing as it considers them 'outdated', just FYI.
I noticed because Batteries needs it. No promises but I'll make an effort this week! I'll rebase first so I can see the difference from where he started in a single commit.
@sardonicpresence has also done some related work here:
I haven't looked carefully at that, though.
Thanks @rgrempel I tracked both branches locally.
I'm reviewing the old branch and a lot of the Partial
usages look unnecessary. Any help with https://twitter.com/texastoland/status/757448593305468928?
I made pretty heavy use of unsafePartial
on my branch as there are number of guarantees made by the ADTs that are not enforced at the type-level internally. Not sure how you feel about my version of those changes specifically.
I'll compare tonight thanks @sardonicpresence 🙏 I'm specifically struggling with viewX
/deepX
. I'm getting a Partial
binding group error despite exhaustive cases and no explicit constraints which @garyb explained has to do with mutual recursion.
I can't think of a good way to track down where Partial constraints are coming from. I guess this would be a good thing for tooling to be able to do; getting the type of a selected expression gets us most of the way there I guess, but we don't quite have that yet, do we?
Right. As a stopgap I tried randomly injecting unsafePartial
to see whether I could narrow the scope but it's happening at the top level despite my intuition that all cases are covered. I'll look afresh tonight.
There's a different error if you have a partial pattern match that is not typed with a Partial
constraint - so if you're getting a warning about a missing instance, that means a function with the constraint is being used rather than a partial pattern being the problem.
Ugh that was it. I overlooked a usage with an explicit annotation in the mutual recursion. Thanks again @garyb 🙏
Hey, I was wondering what's left to do in this PR? I suspect making sequences work with 0.9.1 is more than defining operators as aliases :)
I've been working on it between a other PRs. The main challenge is [setting aside the time] to verify which functions really ought to be Partial
. This PR assumed the majority of them which if not incorrect should at least be transformed at the type level into something more indicative of what's missing (purescript/purescript#2248). I think I need to grok the algorithm. I'll make a separate PR soon-ish if you'd like to coordinate.
This is WIP - it fails at least one test out of many successful.
I'd love to have a review of my usage of
unsafePartial
, not sure if convenient cowboy approach of shooting first and thinking later works here.I skimmed through the paper, but can't say I fully understand the algorithm, that could have contributed to not very successful update. CC @bkonkle re #22