Open maxsnew opened 1 year ago
As for syntax, should we adopt Haskell's approach of :i
and :t
? Maybe we can have :vtype 1
, :ctype ret 1
and :env
. It would also be nice if we can have ways to
WIP on the repl
branch
I merged in the current version. I think I'll leave it there for now. Now it supports writing values and computations of any type which will be parsed and type-checked, and if the computation is a returner or an OS
it will run it.
It doesn't directly support a type-checking interface, but if you have a computation m
you can just write { m }
and it will display the type it infers. So that's a pretty simple workaround for now. Other features will wait until we add support for libraries etc.
Now with #env
command shipped in and 7e560e3138df72b1be08c6955f46d239699c4109 introducing #type <term>
command to print the type, I'd consider the basic interface done. Further efforts can be made after the basic module system checks in (soon) and with pretty printing implemented for the surface syntax (low-priority).
It would be nice to support some additional features in the repl. Let's use this issue as a tracker for what we should support and discuss relevant design/impl issues.
Ret(A)
andOS
Other suggestions welcome.