Nothing Special   »   [go: up one dir, main page]

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

Lists of builtin categories #222

Closed
andreasabel opened this issue Jan 2, 2018 · 1 comment
Closed

Lists of builtin categories #222

andreasabel opened this issue Jan 2, 2018 · 1 comment

Comments

@andreasabel
Copy link
Member
Sum. S ::= [Integer]  ;
separator Integer "+" ;

Test input:

1+2 +3 +  4+ 5

haskell and haskell-gadt do not print this correctly:

[Abstract Syntax]
Sum [1,2,3,4,5]

[Linearized tree]
1 2 3 4 5

The reason is that the printing classes for builtins do not define the prtList function.

@andreasabel
Copy link
Member Author

Took me forever to find the bug, there was a (maybe intended?) mixup between TokenCat (correct) and Cat (not correct of Integer and friends). Maybe this was a hack not to generate the prtList method for the (errorneous) justification that there is a generic print method for lists (polymorphic).

andreasabel added a commit that referenced this issue Nov 24, 2019
Expanding the testcase for #222 to other backends.
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