on master help sign in
Add `@since 1.2.0.*` annotations
754a01dHerbert Valerio Riedel
Data/Text.hs+1
@@ -370,6 +370,7 @@ instance IsString Text where
370 fromString = pack
370 fromString = pack
371
371
372#if __GLASGOW_HASKELL__ >= 708
372#if __GLASGOW_HASKELL__ >= 708
373+-- | @since 1.2.0.0
373instance Exts.IsList Text where
374instance Exts.IsList Text where
374 type Item Text = Char
375 type Item Text = Char
375 fromList = pack
376 fromList = pack
Data/Text/Lazy.hs+7
@@ -363,6 +363,7 @@ instance IsString Text where
363 fromString = pack
363 fromString = pack
364
364
365#if __GLASGOW_HASKELL__ >= 708
365#if __GLASGOW_HASKELL__ >= 708
366+-- | @since 1.2.0.0
366instance Exts.IsList Text where
367instance Exts.IsList Text where
367 type Item Text = Char
368 type Item Text = Char
368 fromList = pack
369 fromList = pack
@@ -984,6 +985,8 @@ mapAccumR f = go
984
985
985-- | @'repeat' x@ is an infinite 'Text', with @x@ the value of every
986-- | @'repeat' x@ is an infinite 'Text', with @x@ the value of every
986-- element.
987-- element.
988+--
989+-- @since 1.2.0.5
987repeat :: Char -> Text
990repeat :: Char -> Text
988repeat c = let t = Chunk (T.replicate smallChunkSize (T.singleton c)) t
991repeat c = let t = Chunk (T.replicate smallChunkSize (T.singleton c)) t
989 in t
992 in t
@@ -1001,6 +1004,8 @@ replicate n t
1001
1004
1002-- | 'cycle' ties a finite, non-empty 'Text' into a circular one, or
1005-- | 'cycle' ties a finite, non-empty 'Text' into a circular one, or
1003-- equivalently, the infinite repetition of the original 'Text'.
1006-- equivalently, the infinite repetition of the original 'Text'.
1007+--
1008+-- @since 1.2.0.5
1004cycle :: Text -> Text
1009cycle :: Text -> Text
1005cycle Empty = emptyError "cycle"
1010cycle Empty = emptyError "cycle"
1006cycle t = let t' = foldrChunks Chunk t' t
1011cycle t = let t' = foldrChunks Chunk t' t
@@ -1010,6 +1015,8 @@ cycle t = let t' = foldrChunks Chunk t' t
1010-- of @f@ to @x@:
1015-- of @f@ to @x@:
1011--
1016--
1012-- > iterate f x == [x, f x, f (f x), ...]
1017-- > iterate f x == [x, f x, f (f x), ...]
1018+--
1019+-- @since 1.2.0.5
1013iterate :: (Char -> Char) -> Char -> Text
1020iterate :: (Char -> Char) -> Char -> Text
1014iterate f c = let t c' = Chunk (T.singleton c') (t (f c'))
1021iterate f c = let t c' = Chunk (T.singleton c') (t (f c'))
1015 in t c
1022 in t c