plutus-tx-1.36.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusTx.Builtins.HasOpaque

Synopsis

Documentation

class HasToOpaque a arep | a -> arep where Source #

A class for converting values of transparent Haskell-defined built-in types (such as (), Bool, '[]' etc) to their opaque Plutus Tx counterparts. Instances for built-in types that are not transparent are provided as well, simply as identities, since those types are already opaque.

Minimal complete definition

Nothing

Methods

toOpaque :: a -> arep Source #

default toOpaque :: a ~ arep => a -> arep Source #

Instances

Instances details
HasToOpaque BuiltinBLS12_381_G1_Element BuiltinBLS12_381_G1_Element Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasToOpaque BuiltinBLS12_381_G2_Element BuiltinBLS12_381_G2_Element Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasToOpaque BuiltinBLS12_381_MlResult BuiltinBLS12_381_MlResult Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasToOpaque BuiltinByteString BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasToOpaque BuiltinData BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasToOpaque BuiltinInteger BuiltinInteger Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasToOpaque BuiltinString BuiltinString Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasToOpaque () BuiltinUnit Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

Methods

toOpaque :: () -> BuiltinUnit Source #

HasToOpaque Bool BuiltinBool Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

(HasToOpaque a arep, MkNil arep) => HasToOpaque [a] (BuiltinList arep) Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

Methods

toOpaque :: [a] -> BuiltinList arep Source #

HasToOpaque (BuiltinData, BuiltinData) (BuiltinPair BuiltinData BuiltinData) Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

class HasFromOpaque arep a | arep -> a where Source #

A class for converting values of opaque Plutus Tx types to their transparent Haskell-defined counterparts (a.k.a. pattern-matchable) built-in types (such as (), Bool, '[]' etc). If no transparent counterpart exists, then the implementation is identity.

Minimal complete definition

Nothing

Methods

fromOpaque :: arep -> a Source #

default fromOpaque :: a ~ arep => arep -> a Source #

Instances

Instances details
HasFromOpaque BuiltinBLS12_381_G1_Element BuiltinBLS12_381_G1_Element Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasFromOpaque BuiltinBLS12_381_G2_Element BuiltinBLS12_381_G2_Element Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasFromOpaque BuiltinBLS12_381_MlResult BuiltinBLS12_381_MlResult Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasFromOpaque BuiltinBool Bool Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasFromOpaque BuiltinByteString BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasFromOpaque BuiltinData BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasFromOpaque BuiltinInteger BuiltinInteger Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasFromOpaque BuiltinString BuiltinString Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasFromOpaque BuiltinUnit () Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

Methods

fromOpaque :: BuiltinUnit -> () Source #

HasFromOpaque arep a => HasFromOpaque (BuiltinList arep) [a] Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

Methods

fromOpaque :: BuiltinList arep -> [a] Source #

(HasFromOpaque arep a, HasFromOpaque brep b) => HasFromOpaque (BuiltinPair arep brep) (a, b) Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

Methods

fromOpaque :: BuiltinPair arep brep -> (a, b) Source #

mkNilOpaque :: BuiltinList a Source #

The empty list of elements of the given type that gets spotted by the plugin (grep for mkNilOpaque in the plugin code) and replaced by the actual empty list constant for types that are supported (a subset of built-in types).

class MkNil arep where Source #

Minimal complete definition

Nothing

Methods

mkNil :: BuiltinList arep Source #

Orphan instances