zydeco-lang / zydeco

a proof-of-concept programming language based on Call-by-push-value
Other
49 stars 3 forks source link

Pretty Printing #43

Closed maxsnew closed 1 year ago

maxsnew commented 1 year ago

The type being pretty printed at the end here is not valid code, but it should be:

> write_line
{ comatch 
| .arg(s) -> 
  comatch 
  | .arg(k) -> 
    do s <- ! str_append .arg(s) .arg("
") ;
    ! write_str .arg(s) .arg(k)
  end
end } :: Thunk_U(Fn(String(), Fn(Thunk_U(OS()), OS())))

I would expect it to print Thunk(String -> Thunk OS -> OS)

LighghtEeloo commented 1 year ago

Addressed in adfc7f8. Entering values now gives pretty printed types.