It shouldn't be exported. But there are no Char literals, so to construct a Char you need to use one of
fromCharCode 99
fromMaybe (fromCharCode 0) with (charAt 0 "c") or (head $ toCharArray "c") or similar
Data.String.Unsafe.charAt 0 "c"
all of which are somewhat awkward. The first two are safe but obfuscated, the third is unsafe, but at least marked as such.
Lacking character literals, I propose to hide the Char constructor and instead provide Data.String.Unsafe.char :: String -> Char. I can PR if this makes sense.
It shouldn't be exported. But there are no
Charliterals, so to construct aCharyou need to use one offromCharCode 99fromMaybe (fromCharCode 0)with(charAt 0 "c")or(head $ toCharArray "c")or similarData.String.Unsafe.charAt 0 "c"all of which are somewhat awkward. The first two are safe but obfuscated, the third is unsafe, but at least marked as such.
Lacking character literals, I propose to hide the
Charconstructor and instead provideData.String.Unsafe.char :: String -> Char. I can PR if this makes sense.