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

Having scalar with packed types result in location typechecking error #212

Open
PL-666 opened this issue Jun 6, 2023 · 0 comments
Open

Comments

@PL-666
Copy link

PL-666 commented Jun 6, 2023

data MovieTitle = Title Text 
data ReleaseData = RData (Int)  
data Director = Director Text 
data Writers = Writers (PList Text) 
data CastInfo = CastInfo (PList Text)
data MovieTags = MTags (PList Text)
data Rating = Rating Int
data Index = Idx Char
data MovieTrie =  End 
                | MTrie (IsMovie) (Char) (MovieTitle) (Director) (CastInfo) (MovieTags) (Rating)

compile command: gibbon --packed --toC movies.hs
Error message:

In the expression:
DataConE "loc_1489"
         "MTrie"
         [VarE "y_809_1057_1281",VarE "x_803_1051_1275",
          VarE "y_811_1059_1283",VarE "y_812_1060_1284",
          VarE "y_813_1061_1285",VarE "y_814_1062_1286",
          VarE "y_815_1063_1287"]
Locations: Var "loc_1720", Var "loc_1722"

CallStack (from HasCallStack):
In the expression:
DataConE "loc_1539"
         "MTrie"
         [VarE "y_823_1083_1319",VarE "x_817_1077_1313",
          VarE "y_825_1085_1321",VarE "y_826_1086_1322",
          VarE "y_827_1087_1323",VarE "y_828_1088_1324",
          VarE "y_829_1089_1325"]
Locations: Var "loc_1788", Var "loc_1790"

CallStack (from HasCallStack):
  error, called at src/Gibbon/L2/Typecheck.hs:948:23 in gibbon-0.2-inplace:Gibbon.L2.Typecheck
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