diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/world/file.lux | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/stdlib/source/lux/world/file.lux b/stdlib/source/lux/world/file.lux index 0f35422b7..1ee35cd6f 100644 --- a/stdlib/source/lux/world/file.lux +++ b/stdlib/source/lux/world/file.lux @@ -43,7 +43,7 @@ (can-delete [] (! (Error Any)))) (`` (signature: #export (File !) - (~~ (do-template [<name> <output>] + (~~ (template [<name> <output>] [(: (Can-Query ! <output>) <name>)] @@ -56,7 +56,7 @@ (: (Can-Open ! File) move) - (~~ (do-template [<name> <input>] + (~~ (template [<name> <input>] [(: (Can-Modify ! <input>) <name>)] @@ -80,7 +80,7 @@ discard)) (`` (signature: #export (System !) - (~~ (do-template [<name> <capability>] + (~~ (template [<name> <capability>] [(: (Can-Open ! <capability>) <name>)] @@ -97,9 +97,9 @@ (def: (async-file file) (-> (File IO) (File Promise)) (`` (structure - (~~ (do-template [<forge> <name>+] + (~~ (template [<forge> <name>+] [(with-expansions [<rows> (template.splice <name>+)] - (do-template [<name>] + (template [<name>] [(def: <name> (<forge> (|>> (!.use (:: file <name>)) promise.future)))] <rows>))] @@ -118,7 +118,7 @@ (def: (async-directory directory) (-> (Directory IO) (Directory Promise)) - (`` (structure (~~ (do-template [<name> <async>] + (`` (structure (~~ (template [<name> <async>] [(def: <name> (..can-query (|>> (!.use (:: directory <name>)) (io;map (error;map (list;map <async>))) @@ -133,7 +133,7 @@ (def: #export (async system) (-> (System IO) (System Promise)) (`` (structure - (~~ (do-template [<name> <async>] + (~~ (template [<name> <async>] [(def: <name> (..can-open (|>> (!.use (:: system <name>)) (io;map (error;map <async>)) promise.future)))] @@ -159,7 +159,7 @@ (All [!] (-> (System !) [Path Text] Path)) (format parent (:: system separator) child)) -(do-template [<name>] +(template [<name>] [(exception: #export (<name> {file Path}) (ex.report ["Path" file]))] @@ -196,7 +196,7 @@ (`` (for {(~~ (static host.jvm)) (as-is (import: #long java/io/File (new [String]) - (~~ (do-template [<name>] + (~~ (template [<name>] [(<name> [] #io #try boolean)] [createNewFile] [mkdir] @@ -231,7 +231,7 @@ (structure: (file path) (-> Path (File IO)) - (~~ (do-template [<name> <flag>] + (~~ (template [<name> <flag>] [(def: <name> (..can-modify (function (<name> data) @@ -316,7 +316,7 @@ (structure: (directory path) (-> Path (Directory IO)) - (~~ (do-template [<name> <method> <capability>] + (~~ (template [<name> <method> <capability>] [(def: <name> (..can-query (function (<name> _) @@ -343,7 +343,7 @@ (!delete path cannot-discard-directory))))) (structure: #export system (System IO) - (~~ (do-template [<name> <method> <capability> <exception>] + (~~ (template [<name> <method> <capability> <exception>] [(def: <name> (..can-open (function (<name> path) @@ -367,7 +367,7 @@ )) })) -(do-template [<get> <signature> <create> <find> <exception>] +(template [<get> <signature> <create> <find> <exception>] [(def: #export (<get> monad system path) (All [!] (-> (Monad !) (System !) Path (! (Error (<signature> !))))) (do monad |