plutus-core-1.0.0.1: Language library for Plutus Core
Safe Haskell None
Language Haskell2010

PlutusCore.Rename

Description

The user-facing API of the renamer.

Synopsis

Documentation

class Rename a where Source #

The class of things that can be renamed. I.e. things that are capable of satisfying the global uniqueness condition.

Methods

rename :: MonadQuote m => a -> m a Source #

Rename Unique s so that they're globally unique. In case there are any free variables, they must be left untouched and bound variables must not get renamed to free ones. Must always assign new names to bound variables, so that rename can be used for alpha-renaming as well.

Instances

Instances details
Rename a => Rename ( Normalized a) Source #
Instance details

Defined in PlutusCore.Rename

HasUniques ( Type tyname uni ann) => Rename ( Type tyname uni ann) Source #
Instance details

Defined in PlutusCore.Rename

Methods

rename :: MonadQuote m => Type tyname uni ann -> m ( Type tyname uni ann) Source #

HasUniques ( Program name uni fun ann) => Rename ( Program name uni fun ann) Source #
Instance details

Defined in UntypedPlutusCore.Rename

Methods

rename :: MonadQuote m => Program name uni fun ann -> m ( Program name uni fun ann) Source #

HasUniques ( Term name uni fun ann) => Rename ( Term name uni fun ann) Source #
Instance details

Defined in UntypedPlutusCore.Rename

Methods

rename :: MonadQuote m => Term name uni fun ann -> m ( Term name uni fun ann) Source #

HasUniques ( Program tyname name uni fun ann) => Rename ( Program tyname name uni fun ann) Source #
Instance details

Defined in PlutusCore.Rename

Methods

rename :: MonadQuote m => Program tyname name uni fun ann -> m ( Program tyname name uni fun ann) Source #

HasUniques ( Term tyname name uni fun ann) => Rename ( Term tyname name uni fun ann) Source #
Instance details

Defined in PlutusCore.Rename

Methods

rename :: MonadQuote m => Term tyname name uni fun ann -> m ( Term tyname name uni fun ann) Source #

HasUniques ( Term tyname name uni fun ann) => Rename ( Program tyname name uni fun ann) Source #
Instance details

Defined in PlutusIR.Transform.Rename

Methods

rename :: MonadQuote m => Program tyname name uni fun ann -> m ( Program tyname name uni fun ann) Source #

HasUniques ( Term tyname name uni fun ann) => Rename ( Term tyname name uni fun ann) Source #
Instance details

Defined in PlutusIR.Transform.Rename

Methods

rename :: MonadQuote m => Term tyname name uni fun ann -> m ( Term tyname name uni fun ann) Source #

data Dupable a Source #

Dupable a is isomorphic to a , but the only way to extract the a is via liftDupable which renames the stored value along the way. This type is used whenever

  1. preserving global uniqueness is required
  2. some value may be used multiple times

so we annotate such a value with Dupable and call liftDupable at each usage, which ensures global conditions is preserved.

Instances

Instances details
Monad Dupable Source #
Instance details

Defined in PlutusCore.Rename

Functor Dupable Source #
Instance details

Defined in PlutusCore.Rename

Applicative Dupable Source #
Instance details

Defined in PlutusCore.Rename

Foldable Dupable Source #
Instance details

Defined in PlutusCore.Rename

Traversable Dupable Source #
Instance details

Defined in PlutusCore.Rename

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

Defined in PlutusCore.Rename

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

Defined in PlutusCore.Rename

liftDupable :: ( MonadQuote m, Rename a) => Dupable a -> m a Source #

Extract the value stored in a Dupable a and rename it.