{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, Safe #-}
{-# OPTIONS_GHC -Wall -fno-warn-orphans -Werror #-}
module Data.Tuple.Append.Instances.Text.Safe () where
import Data.Text(Text, append, cons, snoc)
import qualified Data.Text.Lazy as TL(Text, append, cons, snoc)
import Data.Tuple.Append.Class(TupleAddL((<++)), TupleAddR((++>)), TupleAppend((+++)))
instance TupleAddL Char Text Text where
<++ :: Char -> Text -> Text
(<++) = Char -> Text -> Text
cons
instance TupleAddR Text Char Text where
++> :: Text -> Char -> Text
(++>) = Text -> Char -> Text
snoc
instance TupleAppend Text Text Text where
+++ :: Text -> Text -> Text
(+++) = Text -> Text -> Text
append
instance TupleAddL Char TL.Text TL.Text where
<++ :: Char -> Text -> Text
(<++) = Char -> Text -> Text
TL.cons
instance TupleAddR TL.Text Char TL.Text where
++> :: Text -> Char -> Text
(++>) = Text -> Char -> Text
TL.snoc
instance TupleAppend TL.Text TL.Text TL.Text where
+++ :: Text -> Text -> Text
(+++) = Text -> Text -> Text
TL.append