plutus-tx-1.0.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellNone
LanguageHaskell2010

PlutusTx.Builtins.Internal

Description

This module contains the special Haskell names that are used to map to builtin types or functions in Plutus Core.

Most users should not use this module directly, but rather use Builtins.

Synopsis

Documentation

data BuiltinBool Source #

Constructors

BuiltinBool Bool 

Instances

Instances details
Data BuiltinBool Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

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

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

toConstr :: BuiltinBool -> Constr Source #

dataTypeOf :: BuiltinBool -> DataType Source #

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

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

gmapT :: (forall b. Data b => b -> b) -> BuiltinBool -> BuiltinBool Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinBool -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinBool -> r Source #

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

gmapQi :: Int -> (forall d. Data d => d -> u) -> BuiltinBool -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BuiltinBool -> m BuiltinBool Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinBool -> m BuiltinBool Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinBool -> m BuiltinBool Source #

ToBuiltin Bool BuiltinBool Source # 
Instance details

Defined in PlutusTx.Builtins.Class

FromBuiltin BuiltinBool Bool Source # 
Instance details

Defined in PlutusTx.Builtins.Class

ifThenElse :: BuiltinBool -> a -> a -> a Source #

data BuiltinUnit Source #

Constructors

BuiltinUnit () 

Instances

Instances details
Data BuiltinUnit Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

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

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

toConstr :: BuiltinUnit -> Constr Source #

dataTypeOf :: BuiltinUnit -> DataType Source #

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

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

gmapT :: (forall b. Data b => b -> b) -> BuiltinUnit -> BuiltinUnit Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinUnit -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinUnit -> r Source #

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

gmapQi :: Int -> (forall d. Data d => d -> u) -> BuiltinUnit -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BuiltinUnit -> m BuiltinUnit Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinUnit -> m BuiltinUnit Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinUnit -> m BuiltinUnit Source #

ToBuiltin () BuiltinUnit Source # 
Instance details

Defined in PlutusTx.Builtins.Class

Methods

toBuiltin :: () -> BuiltinUnit Source #

FromBuiltin BuiltinUnit () Source # 
Instance details

Defined in PlutusTx.Builtins.Class

data BuiltinByteString Source #

An opaque type representing Plutus Core ByteStrings.

Constructors

BuiltinByteString ByteString 

Instances

Instances details
Eq BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Data BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

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

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

toConstr :: BuiltinByteString -> Constr Source #

dataTypeOf :: BuiltinByteString -> DataType Source #

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

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

gmapT :: (forall b. Data b => b -> b) -> BuiltinByteString -> BuiltinByteString Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinByteString -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinByteString -> r Source #

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

gmapQi :: Int -> (forall d. Data d => d -> u) -> BuiltinByteString -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BuiltinByteString -> m BuiltinByteString Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinByteString -> m BuiltinByteString Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinByteString -> m BuiltinByteString Source #

Ord BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Show BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

IsString BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Builtins.Class

Semigroup BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Monoid BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

NFData BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

rnf :: BuiltinByteString -> () Source #

Serialise BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

encode :: BuiltinByteString -> Encoding

decode :: Decoder s BuiltinByteString

encodeList :: [BuiltinByteString] -> Encoding

decodeList :: Decoder s [BuiltinByteString]

Pretty BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

pretty :: BuiltinByteString -> Doc ann

prettyList :: [BuiltinByteString] -> Doc ann

Hashable BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

ByteArray BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

allocRet :: Int -> (Ptr p -> IO a) -> IO (a, BuiltinByteString)

ByteArrayAccess BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Eq BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Eq

Ord BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Ord

Semigroup BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Semigroup

Monoid BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Monoid

UnsafeFromData BuiltinByteString Source # 
Instance details

Defined in PlutusTx.IsData.Class

FromData BuiltinByteString Source # 
Instance details

Defined in PlutusTx.IsData.Class

ToData BuiltinByteString Source # 
Instance details

Defined in PlutusTx.IsData.Class

Includes uni ByteString => Lift uni BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

lift :: BuiltinByteString -> RTCompile uni fun (Term TyName Name uni fun ()) Source #

ToBuiltin ByteString BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Builtins.Class

Methods

toBuiltin :: ByteString -> BuiltinByteString Source #

FromBuiltin BuiltinByteString ByteString Source # 
Instance details

Defined in PlutusTx.Builtins.Class

Methods

fromBuiltin :: BuiltinByteString -> ByteString Source #

Includes uni ByteString => Typeable uni BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

typeRep :: Proxy BuiltinByteString -> RTCompile uni fun (Type TyName uni ()) Source #

traceAll :: forall (a :: Type) (f :: Type -> Type). Foldable f => f Text -> a -> a Source #

data BuiltinString Source #

Constructors

BuiltinString Text 

Instances

Instances details
Eq BuiltinString Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Data BuiltinString Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

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

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

toConstr :: BuiltinString -> Constr Source #

dataTypeOf :: BuiltinString -> DataType Source #

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

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

gmapT :: (forall b. Data b => b -> b) -> BuiltinString -> BuiltinString Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinString -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinString -> r Source #

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

gmapQi :: Int -> (forall d. Data d => d -> u) -> BuiltinString -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BuiltinString -> m BuiltinString Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinString -> m BuiltinString Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinString -> m BuiltinString Source #

Ord BuiltinString Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Show BuiltinString Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

IsString BuiltinString Source # 
Instance details

Defined in PlutusTx.Builtins.Class

Eq BuiltinString Source # 
Instance details

Defined in PlutusTx.Eq

Semigroup BuiltinString Source # 
Instance details

Defined in PlutusTx.Semigroup

Monoid BuiltinString Source # 
Instance details

Defined in PlutusTx.Monoid

Includes uni Text => Lift uni BuiltinString Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

lift :: BuiltinString -> RTCompile uni fun (Term TyName Name uni fun ()) Source #

ToBuiltin Text BuiltinString Source # 
Instance details

Defined in PlutusTx.Builtins.Class

Methods

toBuiltin :: Text -> BuiltinString Source #

FromBuiltin BuiltinString Text Source # 
Instance details

Defined in PlutusTx.Builtins.Class

Methods

fromBuiltin :: BuiltinString -> Text Source #

Includes uni Text => Typeable uni BuiltinString Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

typeRep :: Proxy BuiltinString -> RTCompile uni fun (Type TyName uni ()) Source #

data BuiltinPair a b Source #

Constructors

BuiltinPair (a, b) 

Instances

Instances details
ToBuiltin [(BuiltinData, BuiltinData)] (BuiltinList (BuiltinPair BuiltinData BuiltinData)) Source # 
Instance details

Defined in PlutusTx.Builtins.Class

(Eq a, Eq b) => Eq (BuiltinPair a b) Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

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

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

(Data a, Data b) => Data (BuiltinPair a b) Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

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

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

toConstr :: BuiltinPair a b -> Constr Source #

dataTypeOf :: BuiltinPair a b -> DataType Source #

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

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

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

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

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

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

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

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

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

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

(Ord a, Ord b) => Ord (BuiltinPair a b) Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

(Show a, Show b) => Show (BuiltinPair a b) Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

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

Defined in PlutusTx.Builtins.Class

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

Defined in PlutusTx.Builtins.Class

Methods

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

fst :: BuiltinPair a b -> a Source #

snd :: BuiltinPair a b -> b Source #

data BuiltinList a Source #

Constructors

BuiltinList [a] 

Instances

Instances details
(FromBuiltin arep a, Includes uni [a]) => Lift uni (BuiltinList arep) Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

lift :: BuiltinList arep -> RTCompile uni fun (Term TyName Name uni fun ()) Source #

Eq a => Eq (BuiltinList a) Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Data a => Data (BuiltinList a) Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

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

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

toConstr :: BuiltinList a -> Constr Source #

dataTypeOf :: BuiltinList a -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Ord a => Ord (BuiltinList a) Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Show a => Show (BuiltinList a) Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

ToBuiltin [(BuiltinData, BuiltinData)] (BuiltinList (BuiltinPair BuiltinData BuiltinData)) Source # 
Instance details

Defined in PlutusTx.Builtins.Class

ToBuiltin [BuiltinData] (BuiltinList BuiltinData) Source # 
Instance details

Defined in PlutusTx.Builtins.Class

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

Defined in PlutusTx.Builtins.Class

Methods

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

chooseList :: BuiltinList a -> b -> b -> b Source #

data BuiltinData Source #

A type corresponding to the Plutus Core builtin equivalent of Data.

The point of this type is to be an opaque equivalent of Data, so as to ensure that it is only used in ways that the compiler can handle.

As such, you should use this type in your on-chain code, and in any data structures that you want to be representable on-chain.

For off-chain usage, there are conversion functions builtinDataToData and dataToBuiltinData, but note that these will not work on-chain.

Constructors

BuiltinData Data 

Instances

Instances details
Eq BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Data BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

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

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

toConstr :: BuiltinData -> Constr Source #

dataTypeOf :: BuiltinData -> DataType Source #

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

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

gmapT :: (forall b. Data b => b -> b) -> BuiltinData -> BuiltinData Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinData -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinData -> r Source #

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

gmapQi :: Int -> (forall d. Data d => d -> u) -> BuiltinData -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BuiltinData -> m BuiltinData Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinData -> m BuiltinData Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinData -> m BuiltinData Source #

Ord BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Show BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

NFData BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

rnf :: BuiltinData -> () Source #

Pretty BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

pretty :: BuiltinData -> Doc ann

prettyList :: [BuiltinData] -> Doc ann

Eq BuiltinData Source # 
Instance details

Defined in PlutusTx.Eq

UnsafeFromData BuiltinData Source # 
Instance details

Defined in PlutusTx.IsData.Class

FromData BuiltinData Source # 
Instance details

Defined in PlutusTx.IsData.Class

ToData BuiltinData Source # 
Instance details

Defined in PlutusTx.IsData.Class

Includes uni Data => Lift uni BuiltinData Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

lift :: BuiltinData -> RTCompile uni fun (Term TyName Name uni fun ()) Source #

ToBuiltin BuiltinData BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.Class

FromBuiltin BuiltinData BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.Class

Includes uni Data => Typeable uni BuiltinData Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

typeRep :: Proxy BuiltinData -> RTCompile uni fun (Type TyName uni ()) Source #

ToBuiltin [(BuiltinData, BuiltinData)] (BuiltinList (BuiltinPair BuiltinData BuiltinData)) Source # 
Instance details

Defined in PlutusTx.Builtins.Class

ToBuiltin [BuiltinData] (BuiltinList BuiltinData) Source # 
Instance details

Defined in PlutusTx.Builtins.Class

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

Defined in PlutusTx.Builtins.Class

builtinDataToData :: BuiltinData -> Data Source #

Convert a BuiltinData into a Data. Only works off-chain.

dataToBuiltinData :: Data -> BuiltinData Source #

Convert a Data into a BuiltinData. Only works off-chain.

chooseData :: forall a. BuiltinData -> a -> a -> a -> a -> a -> a Source #