cakeml icon indicating copy to clipboard operation
cakeml copied to clipboard

Add open syntax and semantics

Open oskarabrahamsson opened this issue 3 years ago • 0 comments

This issue will track the progress of adding open and let open forms to the CakeML syntax and semantics.

It is almolst possible to emulate the functionality of open using existing features, but there's no substitute to the re-binding of constructors that is performed by open:

structure S = struct
  datatype foo = Foo
end;

fun foo S.Foo = ();

(* This is the only way to lift S.Foo into the top-level namespace: *)
open S
fun foo Foo = ();

Some progress has been made on the dopen branch, and I think the main issue is that the type system is in the way somehow. @xrchz was the last to work on this branch: do you recall what the issues were?

oskarabrahamsson avatar Apr 12 '22 09:04 oskarabrahamsson