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

Pretty print JuvixCore values consistently with Juvix syntax #1988

Merged
merged 10 commits into from
Apr 12, 2023
Merged

Conversation

lukaszcz
Copy link
Collaborator

@lukaszcz lukaszcz commented Apr 6, 2023

This PR implements pretty printing of evaluation results consistently with Juvix syntax. The printed values do not necessarily originate directly from the source code. All functions/lambdas are printed as <fun>.

The same mechanism is used to implement pretty printing of unmatched pattern examples.

Juvix REPL now uses the new value printing mechanism to display evaluation results. Typing nil in the REPL will now just display nil. The command juvix dev repl still prints raw JuvixCore terms.

@lukaszcz lukaszcz added this to the 0.3.2 milestone Apr 6, 2023
@lukaszcz lukaszcz self-assigned this Apr 6, 2023
@lukaszcz lukaszcz added the enhancement New feature or request label Apr 6, 2023
@lukaszcz lukaszcz temporarily deployed to github-pages April 7, 2023 11:36 — with GitHub Actions Inactive
app/Commands/Repl.hs Outdated Show resolved Hide resolved
src/Juvix/Compiler/Internal/Extra.hs Outdated Show resolved Hide resolved
src/Juvix/Compiler/Internal/Pretty/Base.hs Outdated Show resolved Hide resolved
src/Juvix/Compiler/Internal/Language.hs Outdated Show resolved Hide resolved
src/Juvix/Compiler/Core/Pretty/Base.hs Outdated Show resolved Hide resolved
src/Juvix/Compiler/Core/Extra/Value.hs Outdated Show resolved Hide resolved
src/Juvix/Compiler/Internal/Language.hs Outdated Show resolved Hide resolved
@lukaszcz lukaszcz temporarily deployed to github-pages April 12, 2023 09:44 — with GitHub Actions Inactive
@lukaszcz lukaszcz temporarily deployed to github-pages April 12, 2023 09:59 — with GitHub Actions Inactive
@lukaszcz lukaszcz merged commit 34b0969 into main Apr 12, 2023
@lukaszcz lukaszcz deleted the core-fixity branch April 12, 2023 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to JuvixCore enhancement New feature or request error-messaging prettyprinting repl
Projects
None yet
2 participants