aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/licentia
diff options
context:
space:
mode:
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)))))