mirror of
https://github.com/anoma/juvix.git
synced 2025-01-05 22:46:08 +03:00
Juvix empowers developers to write code in a high-level, functional language, compile it to gas-efficient output VM instructions, and formally verify the safety of their contracts prior to deployment and execution.
41450a88ff
This pr has two relevant changes: ## Errors instead of crases When registering a builtin, we perform some sanity checks. When unsuccessful, the compiler crashes. This seldom happens because builtins are defined in libraries that we write ourselves. However, any compiler crash is a bug, so this pr refactors these crashes into proper errors. ## Registering builtins during scoping Before this pr, builtins are registered and sanity checked during the translation from Concrete to Internal. This imposes that the order in which we translate stuff is relevant, as we must register a builtin before we use it. For the most part this is fine when the dependency is explicit in the code, but sometimes there are explicit dependencies. E.g. do notation and the builtin `monad-bind`. In order to avoid adding special rules, it is easier to just register builtins during scoping, so I've refactored the code to do this. I've also removed the `Builtins` effect and moved its methods to the `InfoTableBuilder` since the builtins table is now part of the Scoped InfoTable. Consequently, I've removed the the field `_artifactBuiltins`. ## Future work - Fix #2952. I didn't find a good way to fix this problem in this pr, so it is left for a separate pr. --------- Co-authored-by: Paul Cadman <git@paulcadman.dev> |
||
---|---|---|
.devcontainer | ||
.github | ||
app | ||
assets | ||
bench | ||
bench2 | ||
examples | ||
gnuplot | ||
include | ||
juvix-stdlib@17a82dd466 | ||
licenses | ||
runtime | ||
scripts | ||
src | ||
test | ||
tests | ||
.clang-format | ||
.github_changelog_generator | ||
.gitignore | ||
.gitmodules | ||
.hlint.yaml | ||
.pre-commit-config.yaml | ||
cabal.hie.yaml | ||
cabal.project | ||
cabal.project.freeze | ||
CHANGELOG.md | ||
cntlines.sh | ||
CONTRIBUTING.md | ||
justfile | ||
LICENSE.md | ||
Makefile | ||
package.yaml | ||
README.md | ||
stack.hie.yaml | ||
stack.yaml |
Juvix
CI Status |
---|
Codebase |
This repository is specifically dedicated to the compiler of the Juvix programming language.
For any Juvix-related inquiries, we strongly advise visiting the following resources.
Our documentation offers an in-depth understanding of the Juvix programming language. It encompasses a language reference, examples, blog posts, and numerous other resources to facilitate effective use of Juvix.