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

Add string comparison to LLVM backend #748

Open
jiribenes opened this issue Dec 13, 2024 · 1 comment
Open

Add string comparison to LLVM backend #748

jiribenes opened this issue Dec 13, 2024 · 1 comment

Comments

@jiribenes
Copy link
Contributor

jiribenes commented Dec 13, 2024

I'd like to have a function compareString: (String, String) => Ordering for #561.
See #561's changes in effekt.effekt for the kind of function we need, then figure out a way to support it on the LLVM backend. :)

Should it be native (somewhere in C)? Should it be written in Effekt itself? No clue.
I think it should be possible and reasonably easy to write this function directly in Effekt, at least if the comparison is byte-wise.

@jiribenes
Copy link
Contributor Author

At the Effekt Working Group Meeting ™️, we talked about this: perhaps having a comparison returning -1, 0, 1 on native byte strings would make sense, then we can just set compareString to use s1.toByteString.compare(s2.toByteString)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant