diff options
author | Eduardo Julian | 2019-07-02 23:36:02 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-07-02 23:36:02 -0400 |
commit | 91c0619657bcf2ac520e7dd2912188f66bbe2157 (patch) | |
tree | f26675f263eb5f0285c1674b0777a7369248fe07 /stdlib/source/lux/data/text/encoding.lux | |
parent | 4f191540f831a7bba0e262b1a6b598f99fb9b35c (diff) |
Re-name "lux/data/error" to "lux/control/try".
Diffstat (limited to 'stdlib/source/lux/data/text/encoding.lux')
-rw-r--r-- | stdlib/source/lux/data/text/encoding.lux | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/stdlib/source/lux/data/text/encoding.lux b/stdlib/source/lux/data/text/encoding.lux index fca1e7632..59e5efcc2 100644 --- a/stdlib/source/lux/data/text/encoding.lux +++ b/stdlib/source/lux/data/text/encoding.lux @@ -3,9 +3,10 @@ ["@" target] [abstract [codec (#+ Codec)]] + [control + ["." try (#+ Try)]] [data - [binary (#+ Binary)] - ["." error (#+ Error)]] + [binary (#+ Binary)]] [type abstract] ["." host]]) @@ -207,16 +208,16 @@ (TextEncoder::encode [value]))}))) (def: #export (from-utf8 value) - (-> Binary (Error Text)) + (-> Binary (Try Text)) (`` (for {(~~ (static @.old)) - (#error.Success (java/lang/String::new value (..name ..utf-8))) + (#try.Success (java/lang/String::new value (..name ..utf-8))) (~~ (static @.jvm)) - (#error.Success (java/lang/String::new value (..name ..utf-8))) + (#try.Success (java/lang/String::new value (..name ..utf-8))) (~~ (static @.js)) - (#error.Success (|> (TextDecoder::new [(..name ..utf-8)]) - (TextDecoder::decode [value])))}))) + (#try.Success (|> (TextDecoder::new [(..name ..utf-8)]) + (TextDecoder::decode [value])))}))) (structure: #export UTF-8 (Codec Binary Text) (def: encode ..to-utf8) |