Commits

Bryan O'Sullivan  committed 0aaaa15

Make lazy Text a Monoid instance.

  • Participants
  • Parent commits 2e466f3

Comments (0)

Files changed (1)

File Data/Text/Lazy.hs

 import Data.Int (Int64)
 import qualified Data.List as L
 import Data.Char (isSpace)
+import Data.Monoid (Monoid(..))
 import Data.String (IsString(..))
 import qualified Data.Text as T
 import qualified Data.Text.Fusion.Common as S
 instance Read Text where
     readsPrec p str = [(pack x,y) | (x,y) <- readsPrec p str]
 
+instance Monoid Text where
+    mempty  = empty
+    mappend = append
+    mconcat = concat
+
 instance IsString Text where
     fromString = pack