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

Give a proper type to literal Strings #1730

Merged
merged 1 commit into from
Jan 16, 2023
Merged

Conversation

paulcadman
Copy link
Collaborator

Previously literal strings were assigned the magic type {A : Type} -> A. Now we have the BuiltinString type we can use that to type literal strings instead.

It also means we can now evaluate string literals in the REPL:

Juvix REPL version 0.2.8-ff748b9: https://juvix.org. Run :help for help
OK loaded: /Users/paul/heliax/juvix-2023/.juvix-build/stdlib/Stdlib/Prelude.juvix
Stdlib.Prelude> :t "a"
String
Stdlib.Prelude> "a"
"a"

Fixes #1720

@paulcadman paulcadman added this to the 0.2.9 milestone Jan 16, 2023
@paulcadman paulcadman self-assigned this Jan 16, 2023
Copy link
Collaborator

@janmasrovira janmasrovira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you

@paulcadman paulcadman merged commit d2a7b8e into main Jan 16, 2023
@paulcadman paulcadman deleted the lit-string-builtin-type branch January 16, 2023 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Evaluating strings in the REPL doesn't work
2 participants