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

bug in incremental_transform #2

Open
jesperbv4 opened this issue Feb 12, 2023 · 3 comments
Open

bug in incremental_transform #2

jesperbv4 opened this issue Feb 12, 2023 · 3 comments

Comments

@jesperbv4
Copy link

If you run the mce and declare a fucntion, when calling the function the passed argument gets transformed to a record. I believe the issue is on line 288. transform_application() maps
tagged_list_to_record forcing the transformation. Tried changing it to map incremental_transform. But now i got other errors trycing to call the factorial function
"throw new Error('head(xs) expects a pair as argument xs, but encountered ' + (0, stringify_1.stringify)(xs));"
"Error: head(xs) expects a pair as argument xs, but encountered undefined"

@jesperbv4
Copy link
Author

jesperbv4 commented Feb 12, 2023

I suspect this function to bethe cause of the second error.
line:291
function transform_operator_combination(op: TaggedListOperatorCombination): OperatorCombination {
return append(list(head(op), head(tail(op)), map(transform_component, tail(tail(op)))));

@lukasm03
Copy link

Having the same issue!

@minimum-sauce
Copy link

Found the solution to the issue:
In incremental_transforms sub-function "transform_operator_combination" there is a typo with the parenthesis.
to resolve this issue, switch out the return statement with the following code:

return append(list(head(op), head(tail(op))), map(transform_component, tail(tail(op))));

before, the parenthesis for the list() where enclosing the second argument map function which in turn appended the value "undefined" to the list which we see in the error message.

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

3 participants