-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Utilities for Control.Lens.Cons
--   
--   concise provides a handful of functions to extend what you can do with
--   Control.Lens.Cons.
@package concise
@version 0.1.0.0

module Control.Lens.Cons.Extras

-- | Convert one type with a <a>Cons</a> instance into the other.
--   
--   Rewrite rules are provided for efficient conversion between
--   <a>String</a> and <tt>Text</tt>, <tt>[<a>Word8</a>]</tt> and
--   <tt>ByteString</tt>, and lazy and strict <tt>Text</tt> and
--   <tt>ByteString</tt>. Programs must be compiled with <tt>-O</tt> to use
--   them.
--   
--   Although the type does not prove it, if <tt>(recons . recons)</tt>
--   exists it should obey:
--   
--   <pre>
--   recons . recons ≡ id
--   </pre>
recons :: (Cons s1 s1 a a, Cons s2 s2 a a, AsEmpty s2) => Getter s1 s2

-- | <pre>
--   unfoldr f = foldrOf (unfolded f) cons (_Empty # ())
--   </pre>
unfoldr :: (Cons s2 s2 a a, AsEmpty s2) => (s1 -> Maybe (a, s1)) -> s1 -> s2
