Skip to content

Switch to visible type applications #56

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sigma-andex
Copy link
Contributor

Switch to visible type applications to make it easier to work with Variants

@jmatsushita
Copy link

jmatsushita commented Apr 12, 2024

Hey thanks, I was looking for this. However, since this approach breaks backward compatibility, how about instead introducing inj' prj' on' variants () that take VTAs?

If purescript-variant was ok with making a breaking release, then here's two libraries that would need to be fixed upstream (that I can identify in my codebase) are:

  • purescript-codec-argonaut that would also require a breaking change to allow variantCase to take a VTA as well.

EDIT: turns out it didn't garyb/purescript-codec-argonaut@master...jmatsushita:purescript-codec-argonaut:master

  • purescript-simple-json would also require a couple of patches here and here.

EDIT here's a patch for this too justinwoo/purescript-simple-json@master...jmatsushita:purescript-simple-json:master

@i-am-the-slime
Copy link

i-am-the-slime commented Aug 6, 2024

Not my library, but I hate function names with 's on them. For my own projects I have a VTA version of inj called as which I find much more beginner-friendly: as @"xyzException" 123
Or 123 # as @"xyzException".

@YourFin
Copy link

YourFin commented Mar 18, 2025

I am interested in getting this merged; anything I can do to help?

@natefaubion
Copy link
Owner

I'm not really interested in making a major breaking change right now without a larger ecosystem migration to VTAs. Aside from the fact that package sets are effectively "nightly", and a breaking change will boot every dependency out of the set, Variant is used in several large codebases that aren't on pursuit. My personal opinion is that if this is imperative, one could publish a purescript-variant-vta package that exports VTA variations.

@sigma-andex
Copy link
Contributor Author

Personally I don’t have the time to work on this anymore, so if anyone is interested in this feel free to take over this PR and either make it non-breaking or as @natefaubion suggested release a separate package.

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.

5 participants