plutus-core-1.0.0.1: Language library for Plutus Core
Safe HaskellNone
LanguageHaskell2010

Universe

Synopsis

Documentation

data Esc a Source #

"Escapes" a type of an arbitrary kind to fit into Type.

data Some (tag :: k -> Type) where #

Bundled Patterns

pattern Some :: forall k tag (a :: k). () => tag a -> Some tag 

Instances

Instances details
GEq tag => Eq (Some tag) 
Instance details

Defined in Data.Some.Newtype

Methods

(==) :: Some tag -> Some tag -> Bool Source #

(/=) :: Some tag -> Some tag -> Bool Source #

GCompare tag => Ord (Some tag) 
Instance details

Defined in Data.Some.Newtype

Methods

compare :: Some tag -> Some tag -> Ordering Source #

(<) :: Some tag -> Some tag -> Bool Source #

(<=) :: Some tag -> Some tag -> Bool Source #

(>) :: Some tag -> Some tag -> Bool Source #

(>=) :: Some tag -> Some tag -> Bool Source #

max :: Some tag -> Some tag -> Some tag Source #

min :: Some tag -> Some tag -> Some tag Source #

GRead f => Read (Some f) 
Instance details

Defined in Data.Some.Newtype

GShow tag => Show (Some tag) 
Instance details

Defined in Data.Some.Newtype

Methods

showsPrec :: Int -> Some tag -> ShowS Source #

show :: Some tag -> String Source #

showList :: [Some tag] -> ShowS Source #

Applicative m => Semigroup (Some m) 
Instance details

Defined in Data.Some.Newtype

Methods

(<>) :: Some m -> Some m -> Some m Source #

sconcat :: NonEmpty (Some m) -> Some m Source #

stimes :: Integral b => b -> Some m -> Some m Source #

Applicative m => Monoid (Some m) 
Instance details

Defined in Data.Some.Newtype

Methods

mempty :: Some m Source #

mappend :: Some m -> Some m -> Some m Source #

mconcat :: [Some m] -> Some m Source #

GNFData tag => NFData (Some tag) 
Instance details

Defined in Data.Some.Newtype

Methods

rnf :: Some tag -> () Source #

(Closed uni, Everywhere uni PrettyConst) => Pretty (Some (ValueOf uni)) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

pretty :: Some (ValueOf uni) -> Doc ann #

prettyList :: [Some (ValueOf uni)] -> Doc ann #

(Closed uni, Everywhere uni ExMemoryUsage) => ExMemoryUsage (Some (ValueOf uni)) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

(Closed uni, Everywhere uni Flat) => Flat (Some (ValueOf uni)) 
Instance details

Defined in PlutusCore.Flat

Methods

encode :: Some (ValueOf uni) -> Encoding

decode :: Get (Some (ValueOf uni))

size :: Some (ValueOf uni) -> NumBits -> NumBits

data SomeTypeIn uni Source #

A particular type from a universe.

Constructors

forall k (a :: k). SomeTypeIn !(uni (Esc a)) 

Instances

Instances details
GEq uni => Eq (SomeTypeIn uni) Source # 
Instance details

Defined in Universe.Core

Methods

(==) :: SomeTypeIn uni -> SomeTypeIn uni -> Bool Source #

(/=) :: SomeTypeIn uni -> SomeTypeIn uni -> Bool Source #

GCompare uni => Ord (SomeTypeIn uni) Source # 
Instance details

Defined in Universe.Core

GShow uni => Show (SomeTypeIn uni) Source # 
Instance details

Defined in Universe.Core

Closed uni => NFData (SomeTypeIn uni) Source # 
Instance details

Defined in Universe.Core

Methods

rnf :: SomeTypeIn uni -> () Source #

GShow uni => Pretty (SomeTypeIn uni) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

pretty :: SomeTypeIn uni -> Doc ann #

prettyList :: [SomeTypeIn uni] -> Doc ann #

ExMemoryUsage (SomeTypeIn uni) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Closed uni => Flat (SomeTypeIn uni) 
Instance details

Defined in PlutusCore.Flat

Methods

encode :: SomeTypeIn uni -> Encoding

decode :: Get (SomeTypeIn uni)

size :: SomeTypeIn uni -> NumBits -> NumBits

data Kinded uni ta where Source #

Constructors

Kinded :: Typeable k => !(uni (Esc a)) -> Kinded uni (Esc (a :: k)) 

Instances

Instances details
GShow uni => GShow (Kinded uni :: Type -> Type) Source # 
Instance details

Defined in Universe.Core

Methods

gshowsPrec :: forall (a :: k). Int -> Kinded uni a -> ShowS #

GShow uni => Show (Kinded uni ta) Source # 
Instance details

Defined in Universe.Core

Methods

showsPrec :: Int -> Kinded uni ta -> ShowS Source #

show :: Kinded uni ta -> String Source #

showList :: [Kinded uni ta] -> ShowS Source #

data ValueOf uni a Source #

A value of a particular type from a universe.

Constructors

ValueOf !(uni (Esc a)) !a 

Instances

Instances details
(GCompare uni, Closed uni, Everywhere uni Ord, Everywhere uni Eq) => GCompare (ValueOf uni :: Type -> Type) Source # 
Instance details

Defined in Universe.Core

Methods

gcompare :: forall (a :: k) (b :: k). ValueOf uni a -> ValueOf uni b -> GOrdering a b

(GEq uni, Closed uni, Everywhere uni Eq) => GEq (ValueOf uni :: Type -> Type) Source # 
Instance details

Defined in Universe.Core

Methods

geq :: forall (a :: k) (b :: k). ValueOf uni a -> ValueOf uni b -> Maybe (a :~: b) #

(GShow uni, Closed uni, Everywhere uni Show) => GShow (ValueOf uni :: Type -> Type) Source # 
Instance details

Defined in Universe.Core

Methods

gshowsPrec :: forall (a :: k). Int -> ValueOf uni a -> ShowS #

(Closed uni, Everywhere uni NFData) => GNFData (ValueOf uni) Source # 
Instance details

Defined in Universe.Core

Methods

grnf :: ValueOf uni a -> ()

(GEq uni, Closed uni, Everywhere uni Eq) => Eq (ValueOf uni a) Source # 
Instance details

Defined in Universe.Core

Methods

(==) :: ValueOf uni a -> ValueOf uni a -> Bool Source #

(/=) :: ValueOf uni a -> ValueOf uni a -> Bool Source #

(GCompare uni, Closed uni, Everywhere uni Ord, Everywhere uni Eq) => Ord (ValueOf uni a) Source # 
Instance details

Defined in Universe.Core

Methods

compare :: ValueOf uni a -> ValueOf uni a -> Ordering Source #

(<) :: ValueOf uni a -> ValueOf uni a -> Bool Source #

(<=) :: ValueOf uni a -> ValueOf uni a -> Bool Source #

(>) :: ValueOf uni a -> ValueOf uni a -> Bool Source #

(>=) :: ValueOf uni a -> ValueOf uni a -> Bool Source #

max :: ValueOf uni a -> ValueOf uni a -> ValueOf uni a Source #

min :: ValueOf uni a -> ValueOf uni a -> ValueOf uni a Source #

(GShow uni, Closed uni, Everywhere uni Show) => Show (ValueOf uni a) Source # 
Instance details

Defined in Universe.Core

Methods

showsPrec :: Int -> ValueOf uni a -> ShowS Source #

show :: ValueOf uni a -> String Source #

showList :: [ValueOf uni a] -> ShowS Source #

(Closed uni, Everywhere uni NFData) => NFData (ValueOf uni a) Source # 
Instance details

Defined in Universe.Core

Methods

rnf :: ValueOf uni a -> () Source #

(Closed uni, Everywhere uni PrettyConst) => Pretty (Some (ValueOf uni)) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

pretty :: Some (ValueOf uni) -> Doc ann #

prettyList :: [Some (ValueOf uni)] -> Doc ann #

(Closed uni, Everywhere uni PrettyConst) => Pretty (ValueOf uni a) Source #

Special treatment for built-in constants: see the Note in PlutusCore.Pretty.PrettyConst.

Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

pretty :: ValueOf uni a -> Doc ann #

prettyList :: [ValueOf uni a] -> Doc ann #

(Closed uni, Everywhere uni ExMemoryUsage) => ExMemoryUsage (Some (ValueOf uni)) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

(Closed uni, Everywhere uni Flat) => Flat (Some (ValueOf uni)) 
Instance details

Defined in PlutusCore.Flat

Methods

encode :: Some (ValueOf uni) -> Encoding

decode :: Get (Some (ValueOf uni))

size :: Some (ValueOf uni) -> NumBits -> NumBits

someValueOf :: forall a uni. uni (Esc a) -> a -> Some (ValueOf uni) Source #

Wrap a value into Some (ValueOf uni), given its explicit type tag.

someValue :: forall a uni. uni `Includes` a => a -> Some (ValueOf uni) Source #

Wrap a value into Some (ValueOf uni), provided its type is in the universe.

class Contains uni a where Source #

A class for enumerating types and fully instantiated type formers that uni contains. For example, a particular ExampleUni may have monomorphic types in it:

instance ExampleUni Contains Integer where ... instance ExampleUni Contains Bool where ...

as well as polymorphic ones:

instance ExampleUni Contains [] where ... instance ExampleUni Contains (,) where ...

as well as their instantiations:

instance ExampleUni Contains a => ExampleUni Contains [a] where ... instance (ExampleUni Contains a, ExampleUni Contains b) => ExampleUni Contains (a, b) where ...

(a universe can have any subset of the mentioned sorts of types, for example it's fine to have instantiated polymorphic types and not have uninstantiated ones and vice versa)

Note that when used as a constraint of a function Contains does not allow you to directly express things like "uni has the Integer, Bool and [] types and type formers", because [] is not fully instantiated. So you can only say "uni has Integer, Bool, [Integer], [Bool], [[Integer]], [[Bool]] etc" and such manual enumeration is annoying, so we'd really like to be able to say that uni has lists of arbitrary built-in types (including lists of lists etc). Contains does not allow that, but Includes does. For example, in the body of the following definition:

foo :: (uni Includes Integer, uni Includes Bool, uni Includes []) => ... foo = ...

you can make use of the fact that uni has lists of arbitrary included types (integers, booleans and lists).

Hence most of the time opt for using the more flexible Includes.

Includes is defined in terms of Contains, so you only need to provide a Contains instance per type from the universe and you'll get Includes for free.

Methods

knownUni :: uni (Esc a) Source #

Instances

Instances details
(Contains DefaultUni f, Contains DefaultUni a) => Contains DefaultUni (f a :: k2) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUni :: DefaultUni (Esc (f a)) Source #

Contains DefaultUni Bool Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Integer Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni () Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUni :: DefaultUni (Esc ()) Source #

Contains DefaultUni ByteString Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUni :: DefaultUni (Esc ByteString) Source #

Contains DefaultUni Text Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUni :: DefaultUni (Esc Text) Source #

Contains DefaultUni Data Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni (,) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni [] Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUni :: DefaultUni (Esc []) Source #

(TypeError NoStandalonePolymorphicDataErrMsg :: Constraint) => Contains uni (TyVarRep :: TyNameRep kind -> kind) Source # 
Instance details

Defined in PlutusCore.Builtin.Polymorphism

Methods

knownUni :: uni (Esc TyVarRep) Source #

type Includes uni = Permits (Contains uni) Source #

uni Includes a reads as "a is in the uni". a can be of a higher-kind, see the docs of Contains on why you might want that.

newtype DecodeUniM a Source #

A monad to decode types from a universe in. We use a monad for decoding, because parsing arguments of polymorphic built-in types can peel off an arbitrary amount of type tags from the input list of tags and so we have state, which is convenient to handle with, well, StateT.

Constructors

DecodeUniM 

Fields

Instances

Instances details
Monad DecodeUniM Source # 
Instance details

Defined in Universe.Core

Functor DecodeUniM Source # 
Instance details

Defined in Universe.Core

Methods

fmap :: (a -> b) -> DecodeUniM a -> DecodeUniM b Source #

(<$) :: a -> DecodeUniM b -> DecodeUniM a Source #

MonadFail DecodeUniM Source # 
Instance details

Defined in Universe.Core

Methods

fail :: String -> DecodeUniM a Source #

Applicative DecodeUniM Source # 
Instance details

Defined in Universe.Core

Alternative DecodeUniM Source # 
Instance details

Defined in Universe.Core

MonadPlus DecodeUniM Source # 
Instance details

Defined in Universe.Core

class Closed uni where Source #

A universe is Closed, if it's known how to constrain every type from the universe and every type can be encoded to / decoded from a sequence of integer tags. The universe doesn't have to be finite and providing support for infinite universes is the reason why we encode a type as a sequence of integer tags as opposed to a single integer tag. For example, given

  data U a where
      UList :: !(U a) -> U [a]
      UInt  :: U Int

UList (UList UInt) can be encoded to [0,0,1] where 0 and 1 are the integer tags of the UList and UInt constructors, respectively.

Associated Types

type Everywhere uni (constr :: Type -> Constraint) :: Constraint Source #

A constrant for "constr a holds for any a from uni".

Methods

encodeUni :: uni a -> [Int] Source #

Encode a type as a sequence of Int tags. The opposite of decodeUni.

withDecodedUni :: (forall k (a :: k). Typeable k => uni (Esc a) -> DecodeUniM r) -> DecodeUniM r Source #

Decode a type and feed it to the continuation.

bring :: uni `Everywhere` constr => proxy constr -> uni (Esc a) -> (constr a => r) -> r Source #

Bring a constr a instance in scope, provided a is a type from the universe and constr holds for any type from the universe.

Instances

Instances details
Closed DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type Everywhere DefaultUni constr Source #

Methods

encodeUni :: DefaultUni a -> [Int] Source #

withDecodedUni :: (forall k (a :: k). Typeable k => DefaultUni (Esc a) -> DecodeUniM r) -> DecodeUniM r Source #

bring :: Everywhere DefaultUni constr => proxy constr -> DefaultUni (Esc a) -> (constr a => r) -> r Source #

decodeKindedUni :: Closed uni => [Int] -> Maybe (SomeTypeIn (Kinded uni)) Source #

Decode a type from a sequence of Int tags. The opposite of encodeUni (modulo invalid input).

peelUniTag :: DecodeUniM Int Source #

Peel off a tag from the input list of type tags.

type family Permits Source #

constr Permits f elaborates to one of - constr f forall a. constr a => constr (f a) forall a b. (constr a, constr b) => constr (f a b) forall a b c. (constr a, constr b, constr c) => constr (f a b c)

depending on the kind of f. This allows us to say things like

( constr Permits Integer , constr Permits [] , constr Permits (,) )

and thus constraint every type from the universe (including polymorphic ones) to satisfy constr, which is how we provide an implementation of Everywhere for universes with polymorphic types.

Permits is an open type family, so you can provide type instances for fs expecting more type arguments than 3 if you need that.

Note that, say, constr Permits [] elaborates to

forall a. constr a => constr [a]

and for certain type classes that does not make sense (e.g. the Generic instance of [] does not require the type of elements to be Generic), however it's not a problem because we use Permit to constrain the whole universe and so we know that arguments of polymorphic built-in types are builtins themselves are hence do satisfy the constraint and the fact that these constraints on arguments do not get used in the polymorphic case only means that they get ignored.

Instances

Instances details
type Permits Source # 
Instance details

Defined in Universe.Core

type Permits
type Permits Source # 
Instance details

Defined in Universe.Core

type Permits
type Permits Source # 
Instance details

Defined in Universe.Core

type Permits
type Permits Source # 
Instance details

Defined in Universe.Core

type Permits

type family EverywhereAll uni constrs where ... Source #

Equations

EverywhereAll uni '[] = () 
EverywhereAll uni (constr ': constrs) = (uni `Everywhere` constr, uni `EverywhereAll` constrs) 

type (<:) uni1 uni2 = uni1 `Everywhere` Includes uni2 Source #

A constraint for "uni1 is a subuniverse of uni2".

class HasUniApply (uni :: Type -> Type) where Source #

A class for "uni has general type application".

Methods

matchUniApply Source #

Arguments

:: uni tb

The type.

-> r

What to return if the type is not an application.

-> (forall k l (f :: k -> l) a. tb ~ Esc (f a) => uni (Esc f) -> uni (Esc a) -> r)

The continuation taking a function and an argument.

-> r 

Deconstruct a type application into the function and the argument and feed them to the continuation. If the type is not an application, then return the default value.

Instances

Instances details
HasUniApply DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

matchUniApply :: DefaultUni tb -> r -> (forall k l (f :: k -> l) (a :: k). tb ~ Esc (f a) => DefaultUni (Esc f) -> DefaultUni (Esc a) -> r) -> r Source #

checkStar :: forall uni a (x :: a). Typeable a => uni (Esc x) -> Maybe (a :~: Type) Source #

Check if the kind of the given type from the universe is Type.

withApplicable :: forall (a :: Type) (ab :: Type) f x uni m r. (Typeable ab, Typeable a, MonadPlus m) => uni (Esc (f :: ab)) -> uni (Esc (x :: a)) -> (forall (b :: Type). (Typeable b, ab ~ (a -> b)) => m r) -> m r Source #

Check if one type from the universe can be applied to another (i.e. check that the expected kind of the argument matches the actual one) and call the continuation in the refined context. Fail with mzero otherwise.

knownUniOf :: uni `Contains` a => proxy a -> uni (Esc a) Source #

Same as knownUni, but receives a proxy.

class GShow (t :: k -> Type) where #

Methods

gshowsPrec :: forall (a :: k). Int -> t a -> ShowS #

Instances

Instances details
GShow DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

gshowsPrec :: forall (a :: k). Int -> DefaultUni a -> ShowS #

(GShow uni, Closed uni, Everywhere uni Show) => GShow (ValueOf uni :: Type -> Type) Source # 
Instance details

Defined in Universe.Core

Methods

gshowsPrec :: forall (a :: k). Int -> ValueOf uni a -> ShowS #

GShow uni => GShow (Kinded uni :: Type -> Type) Source # 
Instance details

Defined in Universe.Core

Methods

gshowsPrec :: forall (a :: k). Int -> Kinded uni a -> ShowS #

GShow (TypeRep :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec :: forall (a :: k0). Int -> TypeRep a -> ShowS #

GShow (GOrdering a :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec :: forall (a0 :: k0). Int -> GOrdering a a0 -> ShowS #

GShow ((:~:) a :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec :: forall (a0 :: k0). Int -> (a :~: a0) -> ShowS #

(GShow a, GShow b) => GShow (Sum a b :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec :: forall (a0 :: k0). Int -> Sum a b a0 -> ShowS #

(GShow a, GShow b) => GShow (Product a b :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec :: forall (a0 :: k0). Int -> Product a b a0 -> ShowS #

gshow :: forall k t (a :: k). GShow t => t a -> String #

class GEq (f :: k -> Type) where #

Methods

geq :: forall (a :: k) (b :: k). f a -> f b -> Maybe (a :~: b) #

Instances

Instances details
GEq DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

geq :: forall (a :: k) (b :: k). DefaultUni a -> DefaultUni b -> Maybe (a :~: b) #

(GEq uni, Closed uni, Everywhere uni Eq) => GEq (ValueOf uni :: Type -> Type) Source # 
Instance details

Defined in Universe.Core

Methods

geq :: forall (a :: k) (b :: k). ValueOf uni a -> ValueOf uni b -> Maybe (a :~: b) #

GEq (TypeRep :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

geq :: forall (a :: k0) (b :: k0). TypeRep a -> TypeRep b -> Maybe (a :~: b) #

GEq ((:~:) a :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

geq :: forall (a0 :: k0) (b :: k0). (a :~: a0) -> (a :~: b) -> Maybe (a0 :~: b) #

(GEq a, GEq b) => GEq (Sum a b :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

geq :: forall (a0 :: k0) (b0 :: k0). Sum a b a0 -> Sum a b b0 -> Maybe (a0 :~: b0) #

(GEq a, GEq b) => GEq (Product a b :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

geq :: forall (a0 :: k0) (b0 :: k0). Product a b a0 -> Product a b b0 -> Maybe (a0 :~: b0) #

deriveGEq :: DeriveGEQ t => t -> Q [Dec] #

deriveGCompare :: DeriveGCompare t => t -> Q [Dec] #

data (a :: k) :~: (b :: k) where infix 4 Source #

Propositional equality. If a :~: b is inhabited by some terminating value, then the type a is the same as the type b. To use this equality in practice, pattern-match on the a :~: b to get out the Refl constructor; in the body of the pattern-match, the compiler knows that a ~ b.

Since: base-4.7.0.0

Constructors

Refl :: forall k (a :: k). a :~: a 

Instances

Instances details
Category ((:~:) :: k -> k -> Type)

Since: base-4.7.0.0

Instance details

Defined in Control.Category

Methods

id :: forall (a :: k0). a :~: a Source #

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

Semigroupoid ((:~:) :: k -> k -> Type) 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k0) (k1 :: k0) (i :: k0). (j :~: k1) -> (i :~: j) -> i :~: k1

TestEquality ((:~:) a :: k -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

testEquality :: forall (a0 :: k0) (b :: k0). (a :~: a0) -> (a :~: b) -> Maybe (a0 :~: b) Source #

GCompare ((:~:) a :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

gcompare :: forall (a0 :: k0) (b :: k0). (a :~: a0) -> (a :~: b) -> GOrdering a0 b

GEq ((:~:) a :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

geq :: forall (a0 :: k0) (b :: k0). (a :~: a0) -> (a :~: b) -> Maybe (a0 :~: b) #

GRead ((:~:) a :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

greadsPrec :: Int -> GReadS ((:~:) a)

GShow ((:~:) a :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec :: forall (a0 :: k0). Int -> (a :~: a0) -> ShowS #

NFData2 ((:~:) :: Type -> Type -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> (a :~: b) -> () Source #

NFData1 ((:~:) a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> (a :~: a0) -> () Source #

a ~ b => Bounded (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

minBound :: a :~: b Source #

maxBound :: a :~: b Source #

a ~ b => Enum (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

succ :: (a :~: b) -> a :~: b Source #

pred :: (a :~: b) -> a :~: b Source #

toEnum :: Int -> a :~: b Source #

fromEnum :: (a :~: b) -> Int Source #

enumFrom :: (a :~: b) -> [a :~: b] Source #

enumFromThen :: (a :~: b) -> (a :~: b) -> [a :~: b] Source #

enumFromTo :: (a :~: b) -> (a :~: b) -> [a :~: b] Source #

enumFromThenTo :: (a :~: b) -> (a :~: b) -> (a :~: b) -> [a :~: b] Source #

Eq (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

(==) :: (a :~: b) -> (a :~: b) -> Bool Source #

(/=) :: (a :~: b) -> (a :~: b) -> Bool Source #

(a ~ b, Data a) => Data (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> (a :~: b) -> c (a :~: b) Source #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (a :~: b) Source #

toConstr :: (a :~: b) -> Constr Source #

dataTypeOf :: (a :~: b) -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (a :~: b)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (a :~: b)) Source #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> (a :~: b) -> a :~: b Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (a :~: b) -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (a :~: b) -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> (a :~: b) -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> (a :~: b) -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> (a :~: b) -> m (a :~: b) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (a :~: b) -> m (a :~: b) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (a :~: b) -> m (a :~: b) Source #

Ord (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

compare :: (a :~: b) -> (a :~: b) -> Ordering Source #

(<) :: (a :~: b) -> (a :~: b) -> Bool Source #

(<=) :: (a :~: b) -> (a :~: b) -> Bool Source #

(>) :: (a :~: b) -> (a :~: b) -> Bool Source #

(>=) :: (a :~: b) -> (a :~: b) -> Bool Source #

max :: (a :~: b) -> (a :~: b) -> a :~: b Source #

min :: (a :~: b) -> (a :~: b) -> a :~: b Source #

a ~ b => Read (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Show (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

showsPrec :: Int -> (a :~: b) -> ShowS Source #

show :: (a :~: b) -> String Source #

showList :: [a :~: b] -> ShowS Source #

NFData (a :~: b)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a :~: b) -> () Source #