Fixed ownership issues in name resolver

This commit is contained in:
2022-06-02 04:27:01 +02:00
parent ec1734e113
commit 6ddbda8cd5
7 changed files with 133 additions and 34 deletions

View File

@@ -0,0 +1,5 @@
[[target]]
name = 'Dummy Project'
type = 'executable'
[target.dependencies]

View 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)