urbit-hob

Haskell utilities for phonetic base wrangling.
Log | Files | Refs | README | LICENSE

commit e20e5ceeeeec41f5deca449b6a1c21aa4ee6d01d
parent 15fba8a5476268c51b64a13d0a42335c4de20f78
Author: Jared Tobin <jared@jtobin.io>
Date:   Sun, 28 Jun 2020 18:44:53 +0400

co: tweak error message on bad parse

These 'bad parse' messages are more helpful in downstream code.

Diffstat:
Mlib/Urbit/Ob/Co.hs | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/Urbit/Ob/Co.hs b/lib/Urbit/Ob/Co.hs @@ -249,7 +249,7 @@ fromPrefix syl = case V.findIndex (== syl) prefixes of Nothing -> Left msg Just x -> Right (fromIntegral x :: Word8) where - msg = "urbit-hob (fromPrefix): invalid prefix \"" <> syl <> "\"" + msg = "(urbit-hob) bad parse: invalid prefix \"" <> syl <> "\"" suffixes :: V.Vector T.Text suffixes = V.fromList @@ -284,5 +284,5 @@ fromSuffix syl = case V.findIndex (== syl) suffixes of Nothing -> Left msg Just x -> Right (fromIntegral x :: Word8) where - msg = "urbit-hob (fromSuffix): invalid suffix \"" <> syl <> "\"" + msg = "(urbit-hob) bad parse: invalid suffix \"" <> syl <> "\""