We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
replicate/singleton
1 parent 92768ec commit 1a52e9aCopy full SHA for 1a52e9a
Data/Text/Lazy.hs
@@ -1033,6 +1033,8 @@ replicateChar n c = unstream (S.replicateCharI n (safe c))
1033
{-# RULES
1034
"LAZY TEXT replicate/singleton -> replicateChar" [~1] forall n c.
1035
replicate n (singleton c) = replicateChar n c
1036
+"LAZY TEXT replicate/unstream/singleton -> replicateChar" [~1] forall n c.
1037
+ replicate n (unstream (S.singleton c)) = replicateChar n c
1038
#-}
1039
1040
-- | /O(n)/, where @n@ is the length of the result. The 'unfoldr'
0 commit comments