-
Notifications
You must be signed in to change notification settings - Fork 147
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
Add 'NFDataX.ensureSpine` #803
Conversation
Some other suggestions (I "hate" the name
|
c6b5181
to
40babce
Compare
|
40babce
to
4b617fe
Compare
|
I like ensureSpine the best. |
proto? |
Thanks everyone :). Seems like |
1e729e0
to
804fb9f
Compare
804fb9f
to
0062f0c
Compare
@christiaanb This is ready for review. I don't believe it's possible to deprecate "custom" implementations of type class functions (in this case |
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.
Please keep the method implementations of deepErrorX
; it probably saves on compile time, and maybe even run-time efficiency during simulation.
My original idea was to deprecate "custom" implementations of |
6a4f27f
to
54d7e99
Compare
@christiaanb I've readded |
54d7e99
to
0a96926
Compare
Wanted: a new name forspinify
! Feel free to comment belowensureSpine
it is!Consider the following example:
Currently, this would fail, as
map
tries to pattern match on the constructor of vectorCons
. This constructor doesn't exist however, and resolves toundefined
. In this specific instance we could uselazyV
to create the "spine" ofVec
for us:spinify
generalizes this behavior to all data structures having an instance forNFDataX
.Fixes #748