aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux
diff options
context:
space:
mode:
authorEduardo Julian2019-02-11 21:09:29 -0400
committerEduardo Julian2019-02-11 21:09:29 -0400
commit77259cb45d346d66c6feb5b5a5070837780e7bb9 (patch)
tree9d1acac269a9d3d35fd4cf18d009d3c9c33a009d /stdlib/source/lux
parent0e3bacb38f4165e7f54e9c51728ad7762215c248 (diff)
Updated license for 2019.
Diffstat (limited to 'stdlib/source/lux')
-rw-r--r--stdlib/source/lux/world/file.lux28
1 files changed, 14 insertions, 14 deletions
diff --git a/stdlib/source/lux/world/file.lux b/stdlib/source/lux/world/file.lux
index b909578d8..0592d41af 100644
--- a/stdlib/source/lux/world/file.lux
+++ b/stdlib/source/lux/world/file.lux
@@ -144,20 +144,20 @@
(def: separator (:: system separator)))))
-(def: #export (un-nest System<!> file)
+(def: #export (un-nest system file)
(All [!] (-> (System !) Path (Maybe [Path Text])))
- (case (text.last-index-of (:: System<!> separator) file)
+ (case (text.last-index-of (:: system separator) file)
#.None
#.None
(#.Some last-separator)
(let [[parent temp] (maybe.assume (text.split last-separator file))
- [_ child] (maybe.assume (text.split (text.size (:: System<!> separator)) temp))]
+ [_ child] (maybe.assume (text.split (text.size (:: system separator)) temp))]
(#.Some [parent child]))))
-(def: #export (nest System<!> [parent child])
+(def: #export (nest system [parent child])
(All [!] (-> (System !) [Path Text] Path))
- (format parent (:: System<!> separator) child))
+ (format parent (:: system separator) child))
(do-template [<name>]
[(exception: #export (<name> {file Path})
@@ -368,34 +368,34 @@
}))
(do-template [<get> <signature> <create> <find> <exception>]
- [(def: #export (<get> Monad<!> System<!> path)
+ [(def: #export (<get> monad system path)
(All [!] (-> (Monad !) (System !) Path (! (Error (<signature> !)))))
- (do Monad<!>
- [outcome (!.use (:: System<!> <create>) path)]
+ (do monad
+ [outcome (!.use (:: system <create>) path)]
(case outcome
(#error.Success file)
(wrap (#error.Success file))
(#error.Failure error)
(if (ex.match? <exception> error)
- (!.use (:: System<!> <find>) path)
+ (!.use (:: system <find>) path)
(wrap (#error.Failure error))))))]
[get-file File create-file file ..cannot-create-file]
[get-directory Directory create-directory directory ..cannot-create-directory]
)
-(def: #export (exists? Monad<!> System<!> path)
+(def: #export (exists? monad system path)
(All [!] (-> (Monad !) (System !) Path (! Bit)))
- (do Monad<!>
- [?file (!.use (:: System<!> file) path)]
+ (do monad
+ [?file (!.use (:: system file) path)]
(case ?file
(#error.Success file)
(wrap true)
(#error.Failure _)
- (do Monad<!>
- [?directory (!.use (:: System<!> directory) path)]
+ (do monad
+ [?directory (!.use (:: system directory) path)]
(case ?directory
(#error.Success directory)
(wrap true)