Here's what I could come up with but I don't think it's very efficient or safe:
import qualified Data.ByteString.Char8 as B8
convert2Int = read . B8.unpack
Is there a better way to do this? I found functions in libraries that do it for the Int
type, but not for other types like Int32
, Int64
, Word64
, etc.