-
Notifications
You must be signed in to change notification settings - Fork 89
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
Tracking issue: stdlib audit #935
Comments
An idea that came up today: there are certain functions involving polymorphic record contratcs which respect parametricity but due to the contracts involved are not supported in Nickel today. An example would be:
This seems valid, but currently fails because A workaround is to use the primitive operation One way of supporting the above program without encouraging users to use primitive ops would be to expose an
|
IMO it's a little weird that |
We should probably consider #1007 part of this issue. |
As discussed before, let's gather here proposals for addition to the stdlib as well. Taking those of #321 here (originally proposed by @silverraven691):
|
Some more functions to add
|
We have started working on this at #1053 |
Something that I wanted to write an example of generating a record with |
It would be useful to have a contract helper with the following semantics: Given a predicate |
Some more functions:
|
|
To be more in line with the previous naming scheme, I propose |
I like |
We need more contract helper functions in general. The following ideas came up in a weekly meeting.
|
I think it was rather |
You're absolutely right, the perils of not doing things in a timely manner 😅 |
I agree, this issue is as close to completed as it's ever going to get. Let's open more specific ones when necessary. |
We should work out what the desired standard library interface is. This includes (but is not limited to):
fold
vsfoldLeft
)record.values
currently has contract{ ; Dyn } -> Array Str
, but perhaps could haveforall r. { ; r } -> Array Str
)record.map' : forall a b. (Str -> a -> { key: Str, value: b }) -> { _: a } -> { _: b }
from today's Nickel Hour)The text was updated successfully, but these errors were encountered: