Open hasufell opened 4 years ago
Should the interface use Text
instead of ByteString
? In other words, is it safe to assume all bash scripts are Unicode and not arbitrary binary data?
In other words, is it safe to assume all bash scripts are Unicode and not arbitrary binary data?
I don't think arbirary binary data is allowed. But some binary data works just fine as strings for example. I would provide both ByteString and Text version and drop String entirely.
I noticed some things in the AST end up as Char
. I'm not sure how well that would work when parsing as ByteString.
https://hackage.haskell.org/package/language-bash-0.9.0/docs/Language-Bash-Parse.html#v:parse is only String. That is really unfortunate. String is both a weird (not even UTF-8) format and is unefficient. I generally don't use it at all.
Nothing else from the module is exposed, so it's hard to build my own version without forking the library.