push(newStringBlock(contents))
# # TODO(Paths\module) Re-implement & change behavior of built-in function
# # This should actually check if the aforementioned module/package is installed first.
# # If not, it should look it up - and if available online - download it and install it.
# # This obviously goes hand-in-hand with the development & implementation of Arturo's new package manager.
# # labels: library, package manager, enhancement
# builtin "module",
# alias = unaliased,
# op = opNop,
# rule = PrefixPrecedence,
# description = "get path for given module name",
# args = {
# "name" : {String,Literal}
# },
# attrs = NoAttrs,
# returns = {String,Null},
# example = """
# print module 'html ; /usr/local/lib/arturo/html.art
# ..........
# do module 'html ; (imports given module)
# """:
# #=======================================================
# when defined(windows):
# push(newString(HomeDir & ".arturo\\lib\\" & x.s & ".art"))
# else:
# push(newString(HomeDir & ".arturo/lib/" & x.s & ".art"))
builtin "normalize",
alias = unaliased,
ndex 940f24da4e..15898263cf 100644
++ b/src/scripts/console.art
[Paths\module] Re-implement & change behavior of built-in function
This should actually check if the aforementioned module/package is installed first.
If not, it should look it up - and if available online - download it and install it.
This obviously goes hand-in-hand with the development & implementation of Arturo's new package manager.
builtin "module", alias = unaliased, op = opNop, rule = PrefixPrecedence, description = "get path for given module name", args = { "name" : {String,Literal} }, attrs = NoAttrs, returns = {String,Null}, example = """ print module 'html ; /usr/local/lib/arturo/html.art .......... do module 'html ; (imports given module) """:
=======================================================
when defined(windows): push(newString(HomeDir & ".arturo\lib\" & x.s & ".art")) else: push(newString(HomeDir & ".arturo/lib/" & x.s & ".art"))
https://github.com/arturo-lang/arturo/blob/21531d4ec0cfe7a67b0fa3d88a44ff1a8a0473b4/src/library/Paths.nim#L244
6411b1fcd9273cdc87ced0abf16758ab822798f9