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

Install and use the "with-utf8" package #82

Merged
merged 8 commits into from Sep 18, 2023
Merged

Install and use the "with-utf8" package #82

merged 8 commits into from Sep 18, 2023

Conversation

aabounegm
Copy link
Member

To support other locales on systems that do not default to UTF-8

@fizruk
Copy link
Member

fizruk commented Sep 18, 2023

For context: we have encountered that Unicode syntax in Rzk breaks on systems with non-standard locales (e.g. German locales in particular). Which resulted in weird syntax errors for some (but not all!) Unicode symbols used. This PR should fix the issue for everyone 🤞

@fizruk
Copy link
Member

fizruk commented Sep 18, 2023

@deemp it appears that cabal2nix cannot properly handle conditionals, so I had to remove with-utf8 from rzk.nix manually and comment out the use of hpack there as well. This solves the problem, but we now have to repeat this operation every time we update the cabal file and use cabal2nix. Also, this way rzk.nix cannot really build the executable, so it is probably broken for non-GHCJS builds. Perhaps, you know of a better approach here?

@deemp
Copy link
Contributor

deemp commented Sep 18, 2023

Is the final goal to build try-rzk via GHCJS without with-utf8?

The flake.nix provides packages.rzk for non-GHCJS builds and packages.try-rzk for GHCJS builds. It doesn't use rzk.nix.

Later, I can add a default.nix and shell.nix so that people without flakes can get packages and devShells.default.

packages.rzk relies on rzk.cabal manually generated using hpack. It also calls cabal2nix via callCabal2nix. It's possible to override dependencies (necessary Haskell packages) of rzk for GHCJS and non-GHCJS builds.

If I understand the goal correctly, I need to nullify the with-utf8 for GHCJS builds in flake.nix.

@fizruk
Copy link
Member

fizruk commented Sep 18, 2023

Is the final goal to build try-rzk via GHCJS without with-utf8?

Yes, with-utf8 should only be used with GHC, not GHCJS.

@fizruk fizruk merged commit 33522b0 into rzk-lang:develop Sep 18, 2023
1 check passed
@aabounegm aabounegm deleted the utf8 branch September 19, 2023 09:01
This was referenced Sep 19, 2023
@deemp deemp mentioned this pull request Sep 23, 2023
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