Skip to content

Commit

Permalink
move examples/datatype/ to examples/datatypes/
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng committed Nov 15, 2024
1 parent e1f080a commit 893c7f1
Show file tree
Hide file tree
Showing 132 changed files with 30 additions and 30 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ rule cons append
result-(append)
end
import zero from "https://code-of-inet-cute.xieyuheng.com/examples/datatype/Nat.i"
import zero from "https://code-of-inet-cute.xieyuheng.com/examples/datatypes/Nat.i"
null zero cons zero cons
null zero cons zero cons
Expand All @@ -130,7 +130,7 @@ append @run $result
### DiffList

```inet
import List from "https://code-of-inet-cute.xieyuheng.com/examples/datatype/List.i"
import List from "https://code-of-inet-cute.xieyuheng.com/examples/datatypes/List.i"
// Concatenation of lists is performed in linear time
// with respect to its first argument.
Expand Down Expand Up @@ -172,8 +172,8 @@ rule diff diffOpen
(diff)-front oldBack-(diffOpen)
end
import zero from "https://code-of-inet-cute.xieyuheng.com/examples/datatype/Nat.i"
import cons from "https://code-of-inet-cute.xieyuheng.com/examples/datatype/List.i"
import zero from "https://code-of-inet-cute.xieyuheng.com/examples/datatypes/Nat.i"
import cons from "https://code-of-inet-cute.xieyuheng.com/examples/datatypes/List.i"
(diff) @spread $front $back $value
back zero cons zero cons front @connect value
Expand Down
10 changes: 5 additions & 5 deletions docs/articles/programming-with-interaction-nets.md
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ to a local variable named `local`.
import
Nat, zero, add1, add,
one, two, three,
from "https://code-of-inet-cute.xieyuheng.com/examples/datatype/Nat.i"
from "https://code-of-inet-cute.xieyuheng.com/examples/datatypes/Nat.i"
node natErase
Nat :target!
Expand Down Expand Up @@ -892,7 +892,7 @@ rule cons append
result-(append)
end
import zero from "https://code-of-inet-cute.xieyuheng.com/examples/datatype/Nat.i"
import zero from "https://code-of-inet-cute.xieyuheng.com/examples/datatypes/Nat.i"
null zero cons zero cons
null zero cons zero cons
Expand Down Expand Up @@ -937,7 +937,7 @@ in reverse order of the definition,
then we save the ports to local variables for later use.

```
import List from "https://code-of-inet-cute.xieyuheng.com/examples/datatype/List.i"
import List from "https://code-of-inet-cute.xieyuheng.com/examples/datatypes/List.i"
type DiffList @Type -- @Type end
Expand Down Expand Up @@ -972,8 +972,8 @@ rule diff diffOpen
(diff)-front oldBack-(diffOpen)
end
import zero from "https://code-of-inet-cute.xieyuheng.com/examples/datatype/Nat.i"
import cons from "https://code-of-inet-cute.xieyuheng.com/examples/datatype/List.i"
import zero from "https://code-of-inet-cute.xieyuheng.com/examples/datatypes/Nat.i"
import cons from "https://code-of-inet-cute.xieyuheng.com/examples/datatypes/List.i"
(diff) @spread $front $back $value
back zero cons zero cons front @connect value
Expand Down
10 changes: 5 additions & 5 deletions docs/articles/反应网编程.md
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ three two max
import
Nat, zero, add1, add,
one, two, three,
from "https://code-of-inet-cute.xieyuheng.com/examples/datatype/Nat.i"
from "https://code-of-inet-cute.xieyuheng.com/examples/datatypes/Nat.i"
node natErase
Nat :target!
Expand Down Expand Up @@ -861,7 +861,7 @@ rule cons append
result-(append)
end
import zero from "https://code-of-inet-cute.xieyuheng.com/examples/datatype/Nat.i"
import zero from "https://code-of-inet-cute.xieyuheng.com/examples/datatypes/Nat.i"
null zero cons zero cons
null zero cons zero cons
Expand Down Expand Up @@ -900,7 +900,7 @@ append @run $result
然后我们把这些接口保存到了一些局部变量中。

```
import List from "https://code-of-inet-cute.xieyuheng.com/examples/datatype/List.i"
import List from "https://code-of-inet-cute.xieyuheng.com/examples/datatypes/List.i"
type DiffList @Type -- @Type end
Expand Down Expand Up @@ -935,8 +935,8 @@ rule diff diffOpen
(diff)-front oldBack-(diffOpen)
end
import zero from "https://code-of-inet-cute.xieyuheng.com/examples/datatype/Nat.i"
import cons from "https://code-of-inet-cute.xieyuheng.com/examples/datatype/List.i"
import zero from "https://code-of-inet-cute.xieyuheng.com/examples/datatypes/Nat.i"
import cons from "https://code-of-inet-cute.xieyuheng.com/examples/datatypes/List.i"
(diff) @spread $front $back $value
back zero cons zero cons front @connect value
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require "../datatype/Nat.i"
require "../datatypes/Nat.i"

one one add
one one add
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Nat, zero, add1, add from "../datatype/Nat.i"
import Nat, zero, add1, add from "../datatypes/Nat.i"

rule zero add
(add)-addend
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[checkRuleIsAboutOwnNode] To define a rule, one of the node must be owned by this module.

loading module url: examples/module/define-rule-for-non-own-node.error.i
first node module url: examples/datatype/Nat.i
second node module url: examples/datatype/Nat.i
first node module url: examples/datatypes/Nat.i
second node module url: examples/datatypes/Nat.i

[DefineRule.execute] I fail to define rule.

rule nodes: zero add

1 |import Nat, zero, add1, add from "../datatype/Nat.i"
1 |import Nat, zero, add1, add from "../datatypes/Nat.i"
2 |
3 |rule zero add
4 | (add)-addend
Expand Down
3 changes: 3 additions & 0 deletions examples/module/import.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import zero, one, add from "../datatypes/Nat.i"

zero one add @inspect @run @inspect
File renamed without changes.
3 changes: 3 additions & 0 deletions examples/module/require-already-defined.error.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type Nat -- @Type end

require "../datatypes/Nat.i"
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

[Require.execute] I fail to require module.

path: "../datatype/Nat.i"
path: "../datatypes/Nat.i"

1 |type Nat -- @Type end
2 |
3 |require "../datatype/Nat.i"
3 |require "../datatypes/Nat.i"
4 |
2 changes: 1 addition & 1 deletion tests/module/require.i → examples/module/require.i
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
require "../datatype/Nat.i"
require "../datatypes/Nat.i"

zero one add @inspect @run @inspect
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/command-line/commands/Run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ export class Run extends Command<Args, Opts> {
return [
`Run a file:`,
``,
blue(` ${runner.name} ${this.name} examples/datatype/Nat.test.i`),
blue(` ${runner.name} ${this.name} examples/datatypes/Nat.test.i`),
``,
`Run a URL:`,
``,
blue(` ${runner.name} ${this.name} https://code-of-inet-cute.xieyuheng.com/examples/datatype/Nat.test.i`),
blue(` ${runner.name} ${this.name} https://code-of-inet-cute.xieyuheng.com/examples/datatypes/Nat.test.i`),

``,
].join("\n")
Expand Down
3 changes: 0 additions & 3 deletions tests/module/import.i

This file was deleted.

3 changes: 0 additions & 3 deletions tests/module/require-already-defined.error.i

This file was deleted.

0 comments on commit 893c7f1

Please sign in to comment.