I wrote some code a while ago which uses OverloadedStrings
to create ByteString
s from hex-encoded String literals, which it decodes using the functions
In Haskell, typeclass instances are always exported and imported--you can't hide them. This is usually referred to as the "open world assumption".
This means that typeclass instances are also exported transitively: if you import a library with an instance, it gets exported from your module as well.
In this case, the IsString
instance is in Data.ByteString.Char8
, which is imported by Data.ByteString.Base16
. You should be able to replace your import with:
import Data.ByteString.Char8 ()
There is a nice SO question giving some information on the open world assumption, if you're interested.