Ticket #5877 (closed feature request: fixed)
Make StringPrimL take [Word8]
|Reported by:||reinerp||Owned by:||igloo|
|Type of failure:||None/Unknown||Difficulty:||Unknown|
|Test Case:||Blocked By:|
What concerns me is that there seems no means of creating primitive byte-array literals with TH. That is, the Lit type currently only has a constructor StringPrimL String which represents an Addr# literal encoded in UTF-8, thus unsafePackAddressLen 3 "\NUL\NUL\NUL"# works but unsafePackAddressLen 3 $(litE $ StringPrimL "\NUL\NUL\NUL") doesn't. So we probably need to make a change to the type of StringPrimL:
data Lit = CharL Char | StringL String | ... | StringPrimL [Word8] -- Raw, non-encoded "..."# literal.
I attach patches which implement this change.