coercible-subtypes-0.2.0.0: Coercible but only in one direction
Safe HaskellNone
LanguageHaskell2010

Data.Type.Coercion.Sub.Internal

Description

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

Using this module allows to violate the premises Sub 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 Sub (a :: k) (b :: k) Source #

Sub is a newtype wrapper around Coercion, but made opaque to hide the ability to coerce into other direction.

This is convenient for newtype wrappers which give additional guarantees.

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

Constructors

Sub 

Fields

Instances

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

Defined in Data.Type.Coercion.Sub.Internal

Methods

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

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

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

Defined in Data.Type.Coercion.Sub.Internal

Methods

minBound :: Sub a b #

maxBound :: Sub a b #

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

Defined in Data.Type.Coercion.Sub.Internal

Methods

succ :: Sub a b -> Sub a b #

pred :: Sub a b -> Sub a b #

toEnum :: Int -> Sub a b #

fromEnum :: Sub a b -> Int #

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

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

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

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

Eq (Sub a b) Source # 
Instance details

Defined in Data.Type.Coercion.Sub.Internal

Methods

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

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

Ord (Sub a b) Source # 
Instance details

Defined in Data.Type.Coercion.Sub.Internal

Methods

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

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

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

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

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

max :: Sub a b -> Sub a b -> Sub a b #

min :: Sub a b -> Sub a b -> Sub a b #

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

Defined in Data.Type.Coercion.Sub.Internal

Methods

readsPrec :: Int -> ReadS (Sub a b) #

readList :: ReadS [Sub a b] #

readPrec :: ReadPrec (Sub a b) #

readListPrec :: ReadPrec [Sub a b] #

Show (Sub a b) Source # 
Instance details

Defined in Data.Type.Coercion.Sub.Internal

Methods

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

show :: Sub a b -> String #

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