-
Notifications
You must be signed in to change notification settings - Fork 84
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 char #290
base: master
Are you sure you want to change the base?
Add char #290
Conversation
🤔🤔🤔
https://github.com/gfngfn/SATySFi/runs/3682988795?check_suite_focus=true#step:5:5926 |
|
This is my just two cents. Can this be implemented as a macro like Otherwise, is it possible to introduce more generic literal syntax (like Scala’s String Interpolation, C++’s User defined literals, Lisp-families’ read macros, SRFI-10) instead of one specific to For example, define a new syntax |
This is another my two cents. Another option would be “not to introduce a literal syntax for |
Thank you for pointing out the naming of the primitive functions. I explain why I introduced the literal syntax of the
Currently, I must do pattern matching with Unicode scalar value: |
Hmm, then can we introduce a macro function
or with a new macro syntax
Otherwise, we can extend matching with view patterns
or extractors
|
Close #407
I added
char
type and some functions.The
char
type usesUchar.t
type for implementation.ref: https://github.com/gfngfn/SATySFi/projects/1#card-54377937
List of added functions:
char-to-string : char -> string
char-to-unicode-point : char -> int
char-of-unicode-point : int -> char
char-same : char -> char -> bool
See the
tests/char.saty
file for how to use them.