I'm using UUIDs as keys in a Dict. As it stands, Elm does not support sum types as Dict keys, so I'm forced to convert those UUIDs to String using the Uuid.fromString function. But this is not sufficient because
so the capitalization is preserved (which in my case makes Dict keys unequal which should be equal). But per RFC 4122:
Each field is treated as an integer and has its value printed as a
zero-filled hexadecimal digit string with the most significant
digit first. The hexadecimal values "a" through "f" are output as
lower case characters and are case insensitive on input.
So both inputs should produce 1a571a57-0000-4000-b000-000000000000 as output.
I'm using UUIDs as keys in a
Dict
. As it stands, Elm does not support sum types asDict
keys, so I'm forced to convert those UUIDs toString
using theUuid.fromString
function. But this is not sufficient becauseso the capitalization is preserved (which in my case makes
Dict
keys unequal which should be equal). But per RFC 4122:So both inputs should produce
1a571a57-0000-4000-b000-000000000000
as output.