-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Non-empty values of `Data.Text`. -- -- -- Non-empty values of Data.Text. @package text1 @version 0.0.3 module Data.Text1 data Text1 Text1 :: Char -> Text -> Text1 -- |
-- >>> fmap length1 ("a" ^? _Text1)
-- Just 1
--
--
--
-- >>> fmap length1 ("abc" ^? _Text1)
-- Just 3
--
--
-- -- length1 t >= 1 --length1 :: Text1 -> Int -- |
-- >>> fmap (`compareLength1` 1) ("a" ^? _Text1)
-- Just EQ
--
--
--
-- >>> fmap (`compareLength1` 3) ("a" ^? _Text1)
-- Just LT
--
--
--
-- >>> fmap (`compareLength1` 1) ("abc" ^? _Text1)
-- Just GT
--
--
--
-- >>> fmap (`compareLength1` 3) ("abc" ^? _Text1)
-- Just EQ
--
--
--
-- >>> fmap (`compareLength1` 5) ("abc" ^? _Text1)
-- Just LT
--
--
-- -- compareLength1 t 1 /= LT --compareLength1 :: Text1 -> Int -> Ordering -- |
-- >>> fmap (^. _head1) ("a" ^? _Text1)
-- Just 'a'
--
--
--
-- >>> fmap (^. _head1) ("abc" ^? _Text1)
-- Just 'a'
--
--
--
-- >>> fmap (_head1 %~ toUpper) ("abc" ^? _Text1)
-- Just "Abc"
--
_head1 :: Lens' Text1 Char
-- |
-- >>> fmap (^. _tail1) ("a" ^? _Text1)
-- Just ""
--
--
--
-- >>> fmap (^. _tail1) ("abc" ^? _Text1)
-- Just "bc"
--
--
--
-- >>> fmap (_tail1 %~ Text.toUpper) ("abc" ^? _Text1)
-- Just "aBC"
--
_tail1 :: Lens' Text1 Text
-- |
-- >>> fmap (^. _last1) ("a" ^? _Text1)
-- Just 'a'
--
--
--
-- >>> fmap (^. _last1) ("abc" ^? _Text1)
-- Just 'c'
--
--
--
-- >>> fmap (_last1 %~ toUpper) ("abc" ^? _Text1)
-- Just "abC"
--
_last1 :: Lens' Text1 Char
-- |
-- >>> fmap (^. _init1) ("a" ^? _Text1)
-- Just ""
--
--
--
-- >>> fmap (^. _init1) ("abc" ^? _Text1)
-- Just "ab"
--
--
--
-- >>> fmap (_init1 %~ Text.toUpper) ("a" ^? _Text1)
-- Just "a"
--
--
--
-- >>> fmap (_init1 %~ Text.toUpper) ("abc" ^? _Text1)
-- Just "ABc"
--
_init1 :: Lens' Text1 Text
class AsText1 p f s
_Text1 :: AsText1 p f s => Optic' p f s Text1
class IsText1 t where tpacked1 = iso (fmap (\ (h, t') -> (h :| unpack t') ^. packed1) . uncons) (\ t -> case t of { Nothing -> empty Just t' -> pack (toList (packed1 # t')) }) unpacked1 = from packed1 tunpacked1 = from tpacked1 text1 = unpacked1 . traversed
packed1 :: IsText1 t => Iso' (NonEmpty Char) t
tpacked1 :: IsText1 t => Iso' Text (Maybe t)
unpacked1 :: IsText1 t => Iso' t (NonEmpty Char)
tunpacked1 :: IsText1 t => Iso' (Maybe t) Text
text1 :: IsText1 t => IndexedTraversal' Int t Char
class AsSingle c a | c -> a
_Single :: AsSingle c a => Prism' c a
class OneAnd s t a b x y | s -> a, s -> x, t -> b, t -> y, s b -> t, x b -> t, t a -> s, y a -> s
_OneAnd :: OneAnd s t a b x y => Iso s t (a, x) (b, y)
instance Data.Data.Data Data.Text1.Text1
instance GHC.Classes.Ord Data.Text1.Text1
instance GHC.Classes.Eq Data.Text1.Text1
instance GHC.Show.Show Data.Text1.Text1
instance Data.Semigroup.Semigroup Data.Text1.Text1
instance Data.Binary.Class.Binary Data.Text1.Text1
instance Data.Text1.AsText1 p f Data.Text1.Text1
instance (Data.Profunctor.Unsafe.Profunctor p, GHC.Base.Functor f) => Data.Text1.AsText1 p f (Data.List.NonEmpty.NonEmpty GHC.Types.Char)
instance (Data.Profunctor.Choice p, GHC.Base.Applicative f) => Data.Text1.AsText1 p f GHC.Base.String
instance (Data.Profunctor.Choice p, GHC.Base.Applicative f) => Data.Text1.AsText1 p f Data.Text.Internal.Text
instance Data.Text1.IsText1 Data.Text1.Text1
instance Data.Text1.IsText1 (Data.List.NonEmpty.NonEmpty GHC.Types.Char)
instance Control.Lens.Cons.Cons Data.Text1.Text1 Data.Text1.Text1 GHC.Types.Char GHC.Types.Char
instance Control.Lens.Cons.Snoc Data.Text1.Text1 Data.Text1.Text1 GHC.Types.Char GHC.Types.Char
instance Control.Lens.Internal.Iso.Reversing Data.Text1.Text1
instance Data.Text1.AsSingle [a] a
instance Data.Text1.AsSingle Data.Text.Internal.Text GHC.Types.Char
instance Data.Text1.AsSingle (GHC.Base.Maybe a) a
instance Data.Text1.AsSingle (Data.List.NonEmpty.NonEmpty a) a
instance Data.Text1.AsSingle Data.Text1.Text1 GHC.Types.Char
instance Data.Text1.OneAnd Data.Text1.Text1 Data.Text1.Text1 GHC.Types.Char GHC.Types.Char Data.Text.Internal.Text Data.Text.Internal.Text
instance Data.Text1.OneAnd (Data.List.NonEmpty.NonEmpty a) (Data.List.NonEmpty.NonEmpty b) a b [a] [b]