covenant
Copyright(C) MLabs 2025
LicenseApache 2.0
Maintainerkoz@mlabs.city, sean@mlabs.city
Safe HaskellNone
LanguageHaskell2010

Covenant.Prim

Description

Contains definitions relating to Plutus primitive functions in Covenant programs.

Note

In the 1.0.0 release, we didn't include non-flat builtin types, specifically pairs, lists and Data. Thus, the primops that operate on, or produce, these are not currently included.

Since: 1.0.0

Synopsis

Documentation

data OneArgFunc Source #

All one-argument primitives provided by Plutus.

Note

We exclude the MkNilData and MkNilPairData primitives from this list for several reasons. For clarity, we list these below. Firstly, the reason why these primitives still exist at all is historical: Plutus now has the ability to directly 'lift' empty list constants into itself. Secondly, while these primitives could still be used instead of direct lifts, there is never a reason to prefer them, as they are less efficient than embedding a constant directly. Thirdly, their naive typings would end up with overdetermined type variables - consider the typing of MkNilData:

forall a . () -> ![a]

For all of these reasons, we do not represent these primitives in the ASG.

Since: 1.0.0

Instances

Instances details
Arbitrary OneArgFunc Source #

Does not shrink.

Since: 1.0.0

Instance details

Defined in Covenant.Prim

Show OneArgFunc Source #

Since: 1.0.0

Instance details

Defined in Covenant.Prim

Eq OneArgFunc Source #

Since: 1.0.0

Instance details

Defined in Covenant.Prim

Ord OneArgFunc Source #

Since: 1.0.0

Instance details

Defined in Covenant.Prim

typeOneArgFunc :: OneArgFunc -> CompT AbstractTy Source #

Produce the type of a single-argument primop.

Since: 1.0.0

data TwoArgFunc Source #

All two-argument primitives provided by Plutus.

Since: 1.0.0

Instances

Instances details
Arbitrary TwoArgFunc Source #

Does not shrink.

Since: 1.0.0

Instance details

Defined in Covenant.Prim

Show TwoArgFunc Source #

Since: 1.0.0

Instance details

Defined in Covenant.Prim

Eq TwoArgFunc Source #

Since: 1.0.0

Instance details

Defined in Covenant.Prim

Ord TwoArgFunc Source #

Since: 1.0.0

Instance details

Defined in Covenant.Prim

typeTwoArgFunc :: TwoArgFunc -> CompT AbstractTy Source #

Produce the type of a two-argument primop.

Since: 1.0.0

data ThreeArgFunc Source #

All three-argument primitives provided by Plutus.

Since: 1.0.0

Instances

Instances details
Arbitrary ThreeArgFunc Source #

Does not shrink.

Since: 1.0.0

Instance details

Defined in Covenant.Prim

Show ThreeArgFunc Source #

Since: 1.0.0

Instance details

Defined in Covenant.Prim

Eq ThreeArgFunc Source #

Since: 1.0.0

Instance details

Defined in Covenant.Prim

Ord ThreeArgFunc Source #

Since: 1.0.0

Instance details

Defined in Covenant.Prim

typeThreeArgFunc :: ThreeArgFunc -> CompT AbstractTy Source #

Produce the type of a three-argument primop.

Since: 1.0.0