Closed romanofski closed 7 years ago
Yes, probably Text
. There are heaps of places where we need to change from String
to either Text
or ByteString
so we'll broaden the scope of this ticket to dealing with that codebase-wide.
Partway there (using B.ByteString): 082f844. More functions to convert.
ByteString was chosen because I do not want to incur the cost (and possible failure) of UTF-8 decoding in the notmuch binding. purebred and other programs can incur the cost and complexity of the conversion if/where they need to.
Some results and inputs have to be converted to String
, in particular messageFilename :: Message -> IO FilePath
where type FilePath = String
.
Good stuff!!
All the desired conversions are complete except for the Query conversion which is in scope of issue #5. Closing this now.
When I retrieve the values of a message header, the type is String, but I guess what we want is either Text or ByteString?