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

const vs. func #49

Open
zilinc opened this issue Dec 15, 2016 · 0 comments
Open

const vs. func #49

zilinc opened this issue Dec 15, 2016 · 0 comments

Comments

@zilinc
Copy link

zilinc commented Dec 15, 2016

foo : U32
foo = let x = bar 1
       in x + 3

bar : U32 -> U32

is accepted by the compiler, whereas foo is not necessarily a constant.

poly : all a. a
poly = poly' ()

poly' : all a. () -> a

fails to parse (because const can't have a poklytype) so cannot be made a constant.

Do we still have a reason to differentiate functions and constants? Will the code generator or verification toolchain do something bad with the first code snippet?

zilinc pushed a commit that referenced this issue Dec 15, 2016
zilinc pushed a commit that referenced this issue Jan 12, 2017
zilinc pushed a commit that referenced this issue Jan 11, 2018
zilinc pushed a commit that referenced this issue Jan 22, 2018
zilinc pushed a commit that referenced this issue Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant