coercible-subtypes-0.3.0.1: Coercible but only in one direction
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Type.Coercion.Related.Internal

Description

This module exposes internals of Data.Type.Coercion.Related.

Using this module allows to violate the premises Related type provides. It is advisable not to import this module if there is another way, and to limit the amount of code accesible to this module.

Synopsis

Documentation

newtype Related (a :: k) (b :: k) Source #

Related a b witnesses a and b shares the same runtime representation, but nothing about whether a can be safely coerced to or from b.

You can make Related witnesses by using combinators in this module, or the methods of the Category Related instance: id and (.).

Constructors

Related 

Fields

Instances

Instances details
Category (Related :: k -> k -> Type) Source # 
Instance details

Defined in Data.Type.Coercion.Related.Internal

Methods

id :: forall (a :: k0). Related a a #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). Related b c -> Related a b -> Related a c #

Coercible a b => Bounded (Related a b) Source # 
Instance details

Defined in Data.Type.Coercion.Related.Internal

Methods

minBound :: Related a b #

maxBound :: Related a b #

Coercible a b => Enum (Related a b) Source # 
Instance details

Defined in Data.Type.Coercion.Related.Internal

Methods

succ :: Related a b -> Related a b #

pred :: Related a b -> Related a b #

toEnum :: Int -> Related a b #

fromEnum :: Related a b -> Int #

enumFrom :: Related a b -> [Related a b] #

enumFromThen :: Related a b -> Related a b -> [Related a b] #

enumFromTo :: Related a b -> Related a b -> [Related a b] #

enumFromThenTo :: Related a b -> Related a b -> Related a b -> [Related a b] #

Coercible a b => Read (Related a b) Source # 
Instance details

Defined in Data.Type.Coercion.Related.Internal

Show (Related a b) Source # 
Instance details

Defined in Data.Type.Coercion.Related.Internal

Methods

showsPrec :: Int -> Related a b -> ShowS #

show :: Related a b -> String #

showList :: [Related a b] -> ShowS #

Eq (Related a b) Source # 
Instance details

Defined in Data.Type.Coercion.Related.Internal

Methods

(==) :: Related a b -> Related a b -> Bool #

(/=) :: Related a b -> Related a b -> Bool #

Ord (Related a b) Source # 
Instance details

Defined in Data.Type.Coercion.Related.Internal

Methods

compare :: Related a b -> Related a b -> Ordering #

(<) :: Related a b -> Related a b -> Bool #

(<=) :: Related a b -> Related a b -> Bool #

(>) :: Related a b -> Related a b -> Bool #

(>=) :: Related a b -> Related a b -> Bool #

max :: Related a b -> Related a b -> Related a b #

min :: Related a b -> Related a b -> Related a b #