tnelson/Forge

Partial-instance sugar in Froglet

Closed this issue · 1 comments

The partial-instance syntax of Froglet has some leaky abstraction. E.g.,

board = Board -> (1 -> 1 -> `X + 1 -> 2 -> `O)

There are two issues here.
(1) The definition of fields uses relational syntax.
(2) Board must be defined in the partial instance before it can be used, even if its scope will be provided numerically.

Proposed alternative syntax for (1) :

Board0.board = (1, 1) -> `X ;
                            (1, 2) -> `O ; 

Edit: this also applies to field definitions.

#217 addresses (1) but not (2). The syntax does not include semicolons, since it is often used in modeling languages to represent sequential composition. Instead, + is used.