Fixed ownership issues in name resolver
This commit is contained in:
5
examples/dummy_project/Orchid.toml
Normal file
5
examples/dummy_project/Orchid.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
[[target]]
|
||||
name = 'Dummy Project'
|
||||
type = 'executable'
|
||||
|
||||
[target.dependencies]
|
||||
18
examples/dummy_project/main.orc
Normal file
18
examples/dummy_project/main.orc
Normal file
@@ -0,0 +1,18 @@
|
||||
import std::io::(println, out) -- imports
|
||||
|
||||
-- single word substitution (alias)
|
||||
greet = \name. printf out "Hello {}!\n" [name]
|
||||
|
||||
-- multi-word exported substitution
|
||||
export (...$pre ;) $a ...$post) =200=> (...$pre (greet $a) ...$post)
|
||||
|
||||
-- single-word exported substitution
|
||||
export main = (
|
||||
print "What is your name? >>
|
||||
readln >>= \name.
|
||||
greet name
|
||||
)
|
||||
|
||||
-- The broadest trait definition in existence
|
||||
Foo = Bar Baz
|
||||
default anyFoo = @T. @impl:(T (Bar Baz)). impl:(T Foo)
|
||||
Reference in New Issue
Block a user