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

TC: handle all const value types #1116

Merged
merged 1 commit into from
Jan 10, 2023
Merged

Conversation

sirlensalot
Copy link
Contributor

Fixes #1115

TConst{..} -> case _tModule of
-- if modulename is nothing, it's a builtin
Nothing -> toAST $ return $ Left (Direct $ constTerm _tConstVal)
_ -> die i $ "Non-native constant value in native context: " <> showPretty t
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note, this enforcement is gone now. There's no real need for it -- even if it should be syntactically impossible for a user defconst to be Direct, it doesn't really mean anything is un-TC-able

Copy link
Member

@emilypi emilypi left a comment

Choose a reason for hiding this comment

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

LGTM thanks stuart

@sirlensalot sirlensalot merged commit 65c0a8d into master Jan 10, 2023
@sirlensalot sirlensalot deleted the bug/tc-moar-const-types branch January 10, 2023 20:56
@jwiegley
Copy link
Contributor

Thank you!

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.

TC: support non-literal defconst values and fix generated Infos for consts
3 participants