Permalink
Browse files

Merge

  • Loading branch information...
2 parents 0acf272 + 5f5e477 commit e259542bcd1324fd706fa0f14986c8c3e54136b2 @bos committed Feb 1, 2011
Showing with 4 additions and 0 deletions.
  1. +2 −0 Data/Text.hs
  2. +2 −0 Data/Text/Lazy.hs
View
@@ -388,6 +388,8 @@ cons :: Char -> Text -> Text
cons c t = unstream (S.cons (safe c) (stream t))
{-# INLINE cons #-}
+infixr 5 cons
+
-- | /O(n)/ Adds a character to the end of a 'Text'. This copies the
-- entire array in the process, unless fused. Subject to fusion.
-- Performs replacement on invalid scalar values.
View
@@ -392,6 +392,8 @@ cons :: Char -> Text -> Text
cons c t = Chunk (T.singleton c) t
{-# INLINE [1] cons #-}
+infixr 5 cons
+
{-# RULES
"LAZY TEXT cons -> fused" [~1] forall c t.
cons c t = unstream (S.cons c (stream t))

0 comments on commit e259542

Please sign in to comment.