Bryan O'Sullivan committed a956a82

Make cons right-associative.

Requested by Ivan Miljenovic.

  • Participants
  • Parent commits 1a5ce01

Comments (0)

Files changed (2)

File Data/Text.hs

 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.

File Data/Text/Lazy.hs

 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))