You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given more regular treatment of primitives in #138 and #128, it would be easy now to allow first-class binary operations, perhaps using Haskell-style “section” syntax.
Doing this as part of the PureScript port and in particular #301. Will involve porting more of the TypeScript implementation, in particular the bits that deal with binary operations.
full Haskell-style section syntax – see comment below
BinaryOp datatype, binaryOps map from strings to operators
BinaryApp expression form
basic prettyprinting for BinaryApp
delete Typed?
BinaryApp trace form
delete Add form
Op expression and value forms
evaluation and forward-slicing rules for Op expressions
(op) to denote first-class operator
App to handle first-class operators as well as closures
forward-slicing rules for App/operator cases
Op form should take an operator name; eval rule should look this up in the environment
populate initial environment with an entry for each primitive
The text was updated successfully, but these errors were encountered:
Full Haskell-style section syntax, e.g. (3 * 4 +), would involve a non-trivial modification buildExprParser, which currently only supports trees of binary operations. Useful low-hanging fruit would be to allow (+) to denote the operator, which would allow putting expressions like (+) 5 and flip (+) 5 in the function position of an application.
Given more regular treatment of primitives in #138 and #128, it would be easy now to allow first-class binary operations, perhaps using Haskell-style “section” syntax.
Doing this as part of the PureScript port and in particular #301. Will involve porting more of the TypeScript implementation, in particular the bits that deal with binary operations.
full Haskell-style section syntax– see comment belowBinaryOp
datatype,binaryOps
map from strings to operatorsBinaryApp
expression formBinaryApp
Typed
?BinaryApp
trace formAdd
formOp
expression and value formsOp
expressions(op)
to denote first-class operatorApp
to handle first-class operators as well as closuresApp
/operator casesOp
form should take an operator name; eval rule should look this up in the environmentThe text was updated successfully, but these errors were encountered: