Skip to content
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

Adds uncurried ST functions #52

Merged
merged 12 commits into from
Sep 26, 2022
Merged

Conversation

mikesol
Copy link

@mikesol mikesol commented Sep 4, 2022

Description of the change

This PR is a copy-paste of Effect's uncurried functions with an additional nominal type parameter.


Checklist:

  • Added the change to the changelog's "Unreleased" section with a reference to this PR (e.g. "- Made a change (#0000)")
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation
  • Added a test for the contribution (if applicable)

@mikesol
Copy link
Author

mikesol commented Sep 5, 2022

Apologies for the many failed builds, I was too lazy to do the pulp setup on my machine so I just let the CI fail my way to success.

@JordanMartinez
Copy link
Contributor

Can you add a changelog update?

@mikesol
Copy link
Author

mikesol commented Sep 12, 2022

Do folks think the nominal parameter should appear first in the ST functions? Currently, it's:

STFn10 t a b c d e f g h i j r

but it could be instead

STFn10 a b c d e f g h i j t r

I almost always lead with nominal parameters, but if we did it this way, the order of parameters would follow the type better.

@JordanMartinez
Copy link
Contributor

Hm.... If it was at the end but before r, then one could define type aliases like:

--   StFnInt3 t r = StFn Int Int Int t r
type StFnInt3     = StFn Int Int Int

vs

StFnInt3 t = StFn Int Int Int t

I guess that's better?

@mikesol
Copy link
Author

mikesol commented Sep 25, 2022

Hm.... If it was at the end but before r, then one could define type aliases like:

--   StFnInt3 t r = StFn Int Int Int t r
type StFnInt3     = StFn Int Int Int

vs

StFnInt3 t = StFn Int Int Int t

I guess that's better?

Changed.

As per the discussion here: purescript/purescript#4386 (comment), I think this should be merged before we review the compiler change. Let me know if anyone objects.

@JordanMartinez
Copy link
Contributor

@garyb Can this get an approval?

@JordanMartinez JordanMartinez merged commit 8273fed into purescript:master Sep 26, 2022
@mikesol mikesol deleted the uncurried branch September 27, 2022 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants