{-# OPTIONS_GHC -Wno-orphans #-}

module LawfulConversions.Relations.Any where

import LawfulConversions.Algebra
import LawfulConversions.Prelude

-- | Any type is isomorphic to itself.
instance IsSome a a where
  to :: a -> a
to = a -> a
forall a. a -> a
forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id
  maybeFrom :: a -> Maybe a
maybeFrom = a -> Maybe a
forall a. a -> Maybe a
Just (a -> Maybe a) -> (a -> a) -> a -> Maybe a
forall b c a. (b -> c) -> (a -> b) -> a -> c
forall {k} (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. a -> a
forall a. a -> a
forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

-- | Any type is isomorphic to itself.
instance IsMany a a

-- | Any type is isomorphic to itself.
instance Is a a