    module IsomorphismClass.Optics where

    import Data.Profunctor
    import IsomorphismClass.Classes
    import IsomorphismClass.Prelude

    -- | Van-Laarhoven-style Isomorphism, compatible with the \"lens\" library.
    isomorphicToIso :: (IsomorphicTo a b, Profunctor p, Functor f) => p b (f b) -> p a (f a)
    isomorphicToIso :: forall a b (p :: * -> * -> *) (f :: * -> *).
    (IsomorphicTo a b, Profunctor p, Functor f) =>
    p b (f b) -> p a (f a)
    isomorphicToIso = (a -> b) -> (f b -> f a) -> p b (f b) -> p a (f a)
    forall a b c d. (a -> b) -> (c -> d) -> p b c -> p a d
    forall (p :: * -> * -> *) a b c d.
    Profunctor p =>
    (a -> b) -> (c -> d) -> p b c -> p a d
    dimap a -> b
    forall a b. IsomorphicTo a b => a -> b
    from ((b -> a) -> f b -> f a
    forall a b. (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap b -> a
    forall a b. IsomorphicTo a b => b -> a
    to)