summaryrefslogtreecommitdiff
path: root/Text/ProtocolBuffers/Basic.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Text/ProtocolBuffers/Basic.hs')
-rw-r--r--Text/ProtocolBuffers/Basic.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Text/ProtocolBuffers/Basic.hs b/Text/ProtocolBuffers/Basic.hs
index 3a405e5..76737cc 100644
--- a/Text/ProtocolBuffers/Basic.hs
+++ b/Text/ProtocolBuffers/Basic.hs
@@ -22,6 +22,7 @@ import Data.Int(Int32,Int64)
import Data.Ix(Ix)
import Data.Semigroup (Semigroup(..))
import Data.Sequence(Seq,(><))
+import Data.String (IsString(..))
import Data.Typeable(Typeable)
import Data.Word(Word8,Word32,Word64)
@@ -52,6 +53,9 @@ instance Show Utf8 where
s = showsPrec
in s d (U.toString bs)
+instance IsString Utf8 where
+ fromString = uFromString
+
instance Semigroup Utf8 where
(<>) (Utf8 x) (Utf8 y) = Utf8 (x <> y)