{-# LANGUAGE Safe, TypeOperators #-}
module Data.Invertible.Enum
( enum
, succ
) where
import qualified Prelude
import Prelude hiding (succ)
import Data.Invertible.Bijection
enum :: Enum a => Int <-> a
enum :: forall a. Enum a => Int <-> a
enum = Int -> a
forall a. Enum a => Int -> a
toEnum (Int -> a) -> (a -> Int) -> Bijection (->) Int a
forall (a :: * -> * -> *) b c. a b c -> a c b -> Bijection a b c
:<->: a -> Int
forall a. Enum a => a -> Int
fromEnum
succ :: Enum a => a <-> a
succ :: forall a. Enum a => a <-> a
succ = a -> a
forall a. Enum a => a -> a
Prelude.succ (a -> a) -> (a -> a) -> Bijection (->) a a
forall (a :: * -> * -> *) b c. a b c -> a c b -> Bijection a b c
:<->: a -> a
forall a. Enum a => a -> a
pred