{-# LANGUAGE LambdaCase #-}
module PlutusIR.Transform.Unwrap (
unwrapCancel
) where
import PlutusIR
import Control.Lens (transformOf)
unwrapCancelStep
:: Term tyname name uni fun a
-> Term tyname name uni fun a
unwrapCancelStep :: Term tyname name uni fun a -> Term tyname name uni fun a
unwrapCancelStep = \case
Unwrap a
_ (IWrap a
_ Type tyname uni a
_ Type tyname uni a
_ Term tyname name uni fun a
b) -> Term tyname name uni fun a
b
Term tyname name uni fun a
t -> Term tyname name uni fun a
t
unwrapCancel
:: Term tyname name uni fun a
-> Term tyname name uni fun a
unwrapCancel :: Term tyname name uni fun a -> Term tyname name uni fun a
unwrapCancel = ASetter
(Term tyname name uni fun a)
(Term tyname name uni fun a)
(Term tyname name uni fun a)
(Term tyname name uni fun a)
-> (Term tyname name uni fun a -> Term tyname name uni fun a)
-> Term tyname name uni fun a
-> Term tyname name uni fun a
forall a b. ASetter a b a b -> (b -> b) -> a -> b
transformOf ASetter
(Term tyname name uni fun a)
(Term tyname name uni fun a)
(Term tyname name uni fun a)
(Term tyname name uni fun a)
forall tyname name (uni :: * -> *) fun a.
Traversal'
(Term tyname name uni fun a) (Term tyname name uni fun a)
termSubterms Term tyname name uni fun a -> Term tyname name uni fun a
forall tyname name (uni :: * -> *) fun a.
Term tyname name uni fun a -> Term tyname name uni fun a
unwrapCancelStep