Closed tattymennis closed 8 years ago
RecCalc, we only had one binary operation to consider, and that was the arrow type. In this language, we have (x) and (-o) which need to be parsed. I'd like to simply add to the modified table from RecCalc table = [[binOp AssocRight "->" (\d r -> Arr d r)]]
So the table would look like:
table = [[binOp AssocRight "(x)" (\d r -> TensorTy d r)], [binOp AssocRight "-o" (\e s -> Lolly e s]] Haskell doesn't seem to like this. Am I on the right track for setting up these bin ops?
You are on the right track, but AssocRight should be AssocLeft for lolly.
What error do you get?
Should this be closed now? If so, please go a head and close it. 🙃
Yes, closing this issue.
In RecCalc, we only had one binary operation to consider, and that was the arrow type. In this language, we have (x) and (-o) which need to be parsed. I'd like to simply add to the modified table from RecCalc
table = [[binOp AssocRight "->" (\d r -> Arr d r)]]
So the table would look like:
Haskell doesn't seem to like this. Am I on the right track for setting up these bin ops?