-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Track builtins in the Core InfoTable (#1782)
This PR adds a new field `infoBuiltins : HashMap BuiltinPrim IdentKind` to the Core InfoTable. This is used to register builtin inductive, constructors and functions against their corresponding Core symbols/tags. The point of doing this is to make it easier to lookup the Infos for builtins during the internal to core translation: https://github.com/anoma/juvix/blob/d91241a685fae5e31cd5594653545664c23b768c/src/Juvix/Compiler/Core/Translation/FromInternal.hs#L65 This is one proposed approach, I think Jan mentioned using the Builtins effect for this but it doesn't seem appropriate to expose the registration function from the Builtins effect at this part of the code. Perhaps I misunderstood, if so I'm happy to revisit this refactor.
- Loading branch information
1 parent
d8ba7ca
commit 0d18b13
Showing
3 changed files
with
62 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters