diff --git a/TODO.md b/TODO.md index a7d51fae..52e90fc9 100644 --- a/TODO.md +++ b/TODO.md @@ -12,6 +12,10 @@ no `defru` just `defrule` -- add feature when very very needed +# bug + +why no active edge in `Nat.inet.four.initial`? + # render `NetRenderer` -- format to simple text representation of graph diff --git a/docs/notes/design-of-new-syntax.md b/docs/notes/design-of-new-syntax.md index e9ca6b7b..0fc3a6c4 100644 --- a/docs/notes/design-of-new-syntax.md +++ b/docs/notes/design-of-new-syntax.md @@ -10,14 +10,14 @@ Use `defnode` to define a node. `--` separates input ports from output ports in the definition. -Use `!` as prefix to mark the principle port. +Use `!` as postfix to mark the principle port. ```inet -defnode zero -- !return: Nat end +defnode zero -- return: Nat! end -defnode add1 prev: Nat -- !return: Nat end +defnode add1 prev: Nat -- return: Nat! end -defnode add !x: Nat y: Nat -- return: Nat end +defnode add x: Nat! y: Nat -- return: Nat end ``` If there is only one output port, @@ -25,11 +25,11 @@ the `return` is the default name, thus can be omitted. ```inet -defnode zero -- !Nat end +defnode zero -- Nat! end -defnode add1 prev: Nat -- !Nat end +defnode add1 prev: Nat -- Nat! end -defnode add !x: Nat y: Nat -- Nat end +defnode add x: Nat! y: Nat -- Nat end ``` Use `defrule` to define a rule, @@ -74,18 +74,18 @@ end We use a simple type system like Haskell (for now). ```inet -defnode sole -- !Trivial end +defnode sole -- Trivial! end -defnode null -- !List('a) end +defnode null -- List('a)! end defnode cons head: List('a) tail: List('a) - -- !List('a) + -- List('a)! end defnode append - left: !List('a) + left: List('a)! right: List('a) -- List('a) end @@ -122,17 +122,17 @@ end defnode diff left: List('a) right: List('a) - -- !DiffList('a) + -- DiffList('a)! end defnode diff_append - !left: DiffList('a) + left: DiffList('a)! right: DiffList('a) -- DiffList('a) end defnode diff_open - !DiffList('a) + DiffList('a)! list: List('a) -- List('a) end