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

Every function should have a counterpart that does not require Unicode #59

Closed
jonaprieto opened this issue May 5, 2023 · 5 comments · Fixed by #103
Closed

Every function should have a counterpart that does not require Unicode #59

jonaprieto opened this issue May 5, 2023 · 5 comments · Fixed by #103
Assignees
Labels

Comments

@jonaprieto
Copy link
Collaborator

I am unable to type Unicode composition symbol directly in the VSCode REPL. This issue also affects other Unicode symbols. As a workaround, users must either copy-paste the symbol or find an extension that provides Unicode input support in the terminal (which is different from the editor).
In principle, we should always have a counterpart not involving Unicode.
We already discussed this at some point and agreed on it.

∘ f g x := f (g x);

@janmasrovira
Copy link
Contributor

In the case of composition, we should probably use dot, as in Haskell. This will require some extra work in the parser/lexer however

@jonaprieto
Copy link
Collaborator Author

jonaprieto commented May 5, 2023

The dot is fine for the infix symbol. For a function name, I can live with something with a name that matches this regex ((map|fun)-)?comp(isition)? Possibly just comp

@janmasrovira
Copy link
Contributor

what's the justification for wanting a name other than .?

@jonaprieto
Copy link
Collaborator Author

jonaprieto commented May 19, 2023

what's the justification for wanting a name other than .?

Not everyone is familiar with this particular use of the dot symbol.

@paulcadman paulcadman changed the title Every function should have a counterpart that do not require Unicode Every function should have a counterpart that does not require Unicode Jun 19, 2024
@paulcadman
Copy link
Contributor

paulcadman commented Jun 19, 2024

We could use (>>) and (<<) for function composition (from elm). We'd have to find an alternative to (>>) for Monads.

https://package.elm-lang.org/packages/elm/core/latest/Basics#(%3C%3C)

Also add (>|) https://package.elm-lang.org/packages/elm/core/latest/Basics#(%3C|) (from elm).

@paulcadman paulcadman self-assigned this Jun 19, 2024
lukaszcz pushed a commit to anoma/juvix that referenced this issue Jun 26, 2024
This PR updates the juvix-stdlib to the current main commit which
includes:

* anoma/juvix-stdlib#59
* anoma/juvix-stdlib#101

All the Juvix test suite files and examples in this repo have been
updated to be compatible with the new stdlib.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants