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
Currently, when I run pedant compile example/tests.ped I get the following result:
id = x -> EVariable "x" ∀x0. type<x0>->type<x0>
addOne = x -> EBinOp "+" (EVariable "x") (EConstant (ExecutionValueNumber 1.0)) dimensionless->dimensionless
addOneUsd = x -> EBinOp "+" (EVariable "x") (EConstant (ExecutionValueNumber 1.0)) usd->usd
testVar = 1000.0 dimensionless
testId = 1000.0 dimensionless
testAddOne = 1001.0 dimensionless
dict = {x=1.0, y=2.0} {x:dimensionless,y:dimensionless}
val = 1.0 dimensionless
getX = d -> EAccess (EVariable "d") "x" ∀a19. {|x:type<a19>}->type<a19>
val2 = 1.0 dimensionless
The one thing that sticks out like a sore thumb is that functions are printed really poorly, just using the default "show" on an evaluation expression tree. It would be wonderful if this these execution expressions could be pretty printed to make them easier to read.
A simple solution would be to implement PrettyPrint on NumericValue and ExecutionExpression within src/Types.hs. Then use pPrint value instead of show value in src/Pedant.hs when printing expressions.
The text was updated successfully, but these errors were encountered:
Currently, when I run
pedant compile example/tests.ped
I get the following result:The one thing that sticks out like a sore thumb is that functions are printed really poorly, just using the default "show" on an evaluation expression tree. It would be wonderful if this these execution expressions could be pretty printed to make them easier to read.
A simple solution would be to implement
PrettyPrint
onNumericValue
andExecutionExpression
withinsrc/Types.hs
. Then usepPrint value
instead ofshow value
insrc/Pedant.hs
when printing expressions.The text was updated successfully, but these errors were encountered: