module PlutusIR.Mark
( markNonFreshTerm
, markNonFreshType
, markNonFreshProgram
) where
import PlutusCore.Core qualified as PLC
import PlutusCore.Name qualified as PLC
import PlutusCore.Quote
import PlutusIR.Core
import PlutusIR.Subst
markNonFreshTerm
:: (PLC.HasUniques (Term tyname name uni fun ann), MonadQuote m)
=> Term tyname name uni fun ann -> m ()
markNonFreshTerm :: Term tyname name uni fun ann -> m ()
markNonFreshTerm = Set Unique -> m ()
forall (m :: * -> *). MonadQuote m => Set Unique -> m ()
markNonFreshMax (Set Unique -> m ())
-> (Term tyname name uni fun ann -> Set Unique)
-> Term tyname name uni fun ann
-> m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Term tyname name uni fun ann -> Set Unique
forall tyname name (uni :: * -> *) fun ann.
HasUniques (Term tyname name uni fun ann) =>
Term tyname name uni fun ann -> Set Unique
uniquesTerm
markNonFreshType
:: (PLC.HasUniques (Type tyname uni ann), MonadQuote m)
=> Type tyname uni ann -> m ()
markNonFreshType :: Type tyname uni ann -> m ()
markNonFreshType = Set Unique -> m ()
forall (m :: * -> *). MonadQuote m => Set Unique -> m ()
markNonFreshMax (Set Unique -> m ())
-> (Type tyname uni ann -> Set Unique)
-> Type tyname uni ann
-> m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Type tyname uni ann -> Set Unique
forall tyname (uni :: * -> *) ann.
HasUniques (Type tyname uni ann) =>
Type tyname uni ann -> Set Unique
uniquesType
markNonFreshProgram
:: (PLC.HasUniques (Program tyname name uni fun ann), MonadQuote m)
=> Program tyname name uni fun ann
-> m ()
markNonFreshProgram :: Program tyname name uni fun ann -> m ()
markNonFreshProgram (Program ann
_ Term tyname name uni fun ann
body) = Term tyname name uni fun ann -> m ()
forall tyname name (uni :: * -> *) fun ann (m :: * -> *).
(HasUniques (Term tyname name uni fun ann), MonadQuote m) =>
Term tyname name uni fun ann -> m ()
markNonFreshTerm Term tyname name uni fun ann
body