unisonweb / base

Unison base libraries

Home Page:https://share.unison-lang.org/@unison/base

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nitpick: incosistent casing in Bytes.toBase16 and Bytes.toHex

ceedubs opened this issue · comments

Bytes.toBase16 maps to the ASCII codes for lowercase characters (a-f). However, Bytes.toHex maps to uppercase characters (A-F). Unison also pretty-prints Bytes values as hex with lowercase characters, so I think that it would be natural to have Bytes.toHex output lower-case characters.

commented

I believe this is already fixed in main:

     1 | > catch do 0xsabcdef |> Bytes.toHex
          ⧩
          Right "abcdef"