bech32

Pure Haskell bech32, bech32m encoding/decoding (docs.ppad.tech/bech32).
git clone git://git.ppad.tech/bech32.git
Log | Files | Refs | README | LICENSE

commit 66fa0656e124e0e73af0f7cc88d7f13597e8efea
parent e31e3262ee7a6d47ccab17cdd44358abc4ee3a89
Author: Jared Tobin <jared@jtobin.io>
Date:   Fri,  3 Jan 2025 23:23:13 -0330

lib: derpy handle

Diffstat:
Mlib/Data/ByteString/Base32.hs | 6+-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lib/Data/ByteString/Base32.hs b/lib/Data/ByteString/Base32.hs @@ -190,11 +190,7 @@ encode dat = toStrict (go dat) where decode :: BS.ByteString -- ^ base32-encoded bytestring -> Maybe BS.ByteString -- ^ base256-encoded bytestring -decode = handle . go mempty where - handle = \case - Nothing -> Nothing - Just s -> Just (toStrict s) - +decode = fmap toStrict . go mempty where go acc bs@(BI.PS _ _ l) | l < 8 = do fin <- finalize bs