module Plutarch.Unsafe (
  PI.punsafeBuiltin,
  PI.punsafeCoerce,
  PI.punsafeConstant,
  punsafeDowncast,
) where

import Plutarch.Internal.PlutusType (PInner)
import Plutarch.Internal.Term (Term)
import Plutarch.Internal.Term qualified as PI

{- |
  Unsafely coerce from the 'PInner' representation of a Term,
  assuming that the value is a safe construction of the Term.
-}
punsafeDowncast :: Term s (PInner a) -> Term s a
punsafeDowncast :: forall (s :: S) (a :: PType). Term s (PInner a) -> Term s a
punsafeDowncast = Term s (PInner a) -> Term s a
forall (b :: PType) (a :: PType) (s :: S). Term s a -> Term s b
PI.punsafeCoerce