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

types in expressions are not normalised #408

Open
zilinc opened this issue Sep 9, 2021 · 0 comments
Open

types in expressions are not normalised #408

zilinc opened this issue Sep 9, 2021 · 0 comments

Comments

@zilinc
Copy link

zilinc commented Sep 9, 2021

type A = U32

three : A
three = 3

foo : A#[three] -> A
foo x = x@2

It doesn't normalise A to U32 before it converts things into the SMT language, which causes the compiler to crash. It may be due to the equations derived from the constant definitions (https://github.com/au-ts/cogent/blob/master/cogent/src/Cogent/TypeCheck/Solver/SMT.hs#L64), which are taken from the state, in which types are not normalised. Also observed on the wip-reftypes branch.

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