| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Control.Lens.Cons.Extras
Documentation
recons :: (Cons s1 s1 a a, Cons s2 s2 a a, AsEmpty s2) => Getter s1 s2 Source #
Convert one type with a Cons instance into the other.
Rewrite rules are provided for efficient conversion between
String and Text, [ and Word8]ByteString, and lazy and
strict Text and ByteString. Programs must be compiled
with -O to use them.
Although the type does not prove it, if (recons . recons)
exists it should obey:
recons . recons ≡ id
The NOINLINE pragma is used to ensure that recons does not
get inlined into function that are polymorphic in s1 or s2.
Such functions should use the INLINE pragma to give rewrite
rules the best chance of firing.