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

Datatype definition causes L2 typechecking error #201

Open
jazullo opened this issue Mar 21, 2023 · 1 comment
Open

Datatype definition causes L2 typechecking error #201

jazullo opened this issue Mar 21, 2023 · 1 comment

Comments

@jazullo
Copy link
Collaborator

jazullo commented Mar 21, 2023

data C = R
data T = N C Int T

Yields the following error

gibbon: Location typechecking error: Expected after constant relationship
In the expression:
DataConE "loc_130"
         "N"
         [VarE "y_10_49_87",VarE "x_8_47_85",VarE "y_12_51_89"]
Locations: Var "loc_162", Var "loc_164"

CallStack (from HasCallStack):
  error, called at src/Gibbon/L2/Typecheck.hs:948:23 in gibbon-0.2-inplace:Gibbon.L2.Typecheck

on master.
This example is minimal in that removing any part of it does not yield an error.

@jazullo
Copy link
Collaborator Author

jazullo commented Mar 22, 2023

The cause of this error is that a scalar (Int) is following a packed field (C), and the compiler currently does not support this.

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

No branches or pull requests

1 participant