Closed trombonehero closed 9 years ago
We need to be able to define interfaces. The syntax might look like:
Toolchain:type = struct[ cc:(list[file])=>list[file], cxx:(list[file])=>list[file], # etc. ];
or
Toolchain:type = interface { cc:(list[file])=>list[file]; cxx:(list[file])=>list[file]; # etc. };
Usage would then be:
bootstrap:Toolchain = struct { cc = clang.cc; cxx = clang.cxx; }; do_some_stuff = function(toolchain:Toolchain, config:Foo) { ... };
Commit 920aff07323f5ccf20eed319094ef0291753da84 will help with part of this: we can now cast a structure to a supertype.
We need to be able to define interfaces. The syntax might look like:
or
Usage would then be: