Skip to content

Commit 86e15d6

Browse files
authored
Merge pull request #129 from aya-lang/aya-pkg
Package Manager & `import` changes
2 parents 7cf27a5 + f539db8 commit 86e15d6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+1417
-936
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ rdatasets_index.csv
99
.settings/
1010
.project
1111
.classpath
12+
pkg/**

base/__aya__.aya

+8-27
Original file line numberDiff line numberDiff line change
@@ -326,33 +326,6 @@ __aya__.extend.` :extend;
326326
}:struct;
327327

328328

329-
.# ------
330-
.# MODULE
331-
.# ------
332-
333-
.#? module sym\n declare a new module
334-
{name::sym,
335-
:{
336-
name :__modname__;
337-
338-
{meta,
339-
"Cannot create new instance of module $(meta.__modname__:C)" .D
340-
} :__new__;
341-
342-
:{
343-
::module :__type__;
344-
"(module $name)":__repr__;
345-
}:__meta__;
346-
}
347-
name := ; .# assign variable
348-
} __aya__.:_module_impl;
349-
350-
351-
{ : _module_impl(__aya__._module_impl.`),
352-
{ : _module_impl^ , ~:S~ _module_impl} 1 :`
353-
}:module;
354-
355-
356329
.###########
357330
.# CONTROL #
358331
.###########
@@ -425,6 +398,14 @@ __aya__.extend.` :extend;
425398
}__aya__.:with_;
426399
.}
427400

401+
.# val local:foo
402+
{{
403+
.[0]:S.[0] .# extract symbol
404+
\:&@ .# duplicate the value so we can leave it on the stack
405+
:G.[-1] .# get local scope
406+
:D; .# assign
407+
.# val is left on the stack
408+
}1:`} :local;
428409

429410
.################
430411
.# import types #

0 commit comments

Comments
 (0)