From 91c0619657bcf2ac520e7dd2912188f66bbe2157 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 2 Jul 2019 23:36:02 -0400 Subject: Re-name "lux/data/error" to "lux/control/try". --- stdlib/source/program/licentia.lux | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'stdlib/source/program/licentia.lux') 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))))) -- cgit v1.2.3