forked from Orchid/orchid
Rule execution now runs, no tests tho
This commit is contained in:
@@ -9,15 +9,15 @@ export ;> $a =200=> (greet $a)
|
||||
reeee := \$a.b
|
||||
|
||||
-- single-word exported rule
|
||||
export main == (
|
||||
export main := (
|
||||
print "What is your name?" >>
|
||||
readln >>= \name.
|
||||
greet name
|
||||
)
|
||||
|
||||
export < $a ...$rest /> == (createElement (tok_to_str $a) [(props_carriage ...$rest)])
|
||||
export (props_carriage $key = $value) == (tok_to_str $key) => $value
|
||||
export < $a ...$rest /> := (createElement (tok_to_str $a) [(props_carriage ...$rest)])
|
||||
export (props_carriage $key = $value) := (tok_to_str $key) => $value
|
||||
|
||||
-- The broadest trait definition in existence
|
||||
Foo == (Bar Baz)
|
||||
-- default anyFoo = @T. @impl:(T (Bar Baz)). impl:(T Foo)
|
||||
Foo := (Bar Baz)
|
||||
-- default anyFoo = @T. @impl:(T (Bar Baz)). impl:(T Foo)
|
||||
|
||||
1
examples/rule_demo/main.orc
Normal file
1
examples/rule_demo/main.orc
Normal file
@@ -0,0 +1 @@
|
||||
expor main := foo bar baz
|
||||
Reference in New Issue
Block a user