aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/licentia
diff options
context:
space:
mode:
authorEduardo Julian2019-07-02 23:36:02 -0400
committerEduardo Julian2019-07-02 23:36:02 -0400
commit91c0619657bcf2ac520e7dd2912188f66bbe2157 (patch)
treef26675f263eb5f0285c1674b0777a7369248fe07 /stdlib/source/program/licentia
parent4f191540f831a7bba0e262b1a6b598f99fb9b35c (diff)
Re-name "lux/data/error" to "lux/control/try".
Diffstat (limited to '')
-rw-r--r--stdlib/source/program/licentia.lux14
1 files changed, 7 insertions, 7 deletions
diff --git a/stdlib/source/program/licentia.lux b/stdlib/source/program/licentia.lux
index 7f19a829c..5021eb5bb 100644
--- a/stdlib/source/program/licentia.lux
+++ b/stdlib/source/program/licentia.lux
@@ -17,12 +17,12 @@
[monad (#+ do)]]
[control
[remember (#+ to-do)]
+ ["." try (#+ Try)]
["." parser]
[security
["!" capability]]]
[data
["." maybe]
- ["." error (#+ Error)]
["." text
["%" format (#+ format)]
["." encoding]]
@@ -55,11 +55,11 @@
{output (parser.default ..default-output-file
(cli.named "--output" cli.any))}]
(do io.monad
- [?done (: (IO (Error Any))
- (do (error.with io.monad)
+ [?done (: (IO (Try Any))
+ (do (try.with io.monad)
[file (!.use (:: file.system file) input)
blob (!.use (:: file content) [])
- document (io;wrap (do error.monad
+ document (io;wrap (do try.monad
[raw-json (encoding.from-utf8 blob)
json (|> raw-json
(:coerce java/lang/String)
@@ -67,12 +67,12 @@
(:: json.codec decode))
license (json.run json /input.license)]
(wrap (/output.license license))))
- output-file (: (IO (Error (File IO)))
+ output-file (: (IO (Try (File IO)))
(file.get-file io.monad file.system output))]
(!.use (:: output-file over-write) (encoding.to-utf8 document))))]
(case ?done
- (#error.Success _)
+ (#try.Success _)
(wrap (log! (success-message output)))
- (#error.Failure message)
+ (#try.Failure message)
(wrap (log! message)))))