{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE StandaloneDeriving #-} module Test.Cardano.Ledger.Plutus.ScriptTestContext ( PlutusArgs (..), ScriptTestContext (..), ) where import Cardano.Ledger.Plutus.Language (Plutus, PlutusLanguage) import Control.DeepSeq (NFData (..)) import GHC.Generics (Generic) import PlutusLedgerApi.Common (Data) data PlutusArgs = PlutusArgs { PlutusArgs -> Data paData :: Data , PlutusArgs -> Maybe Data paSpendDatum :: Maybe Data } deriving (forall x. Rep PlutusArgs x -> PlutusArgs forall x. PlutusArgs -> Rep PlutusArgs x forall a. (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a $cto :: forall x. Rep PlutusArgs x -> PlutusArgs $cfrom :: forall x. PlutusArgs -> Rep PlutusArgs x Generic, Int -> PlutusArgs -> ShowS [PlutusArgs] -> ShowS PlutusArgs -> String forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a showList :: [PlutusArgs] -> ShowS $cshowList :: [PlutusArgs] -> ShowS show :: PlutusArgs -> String $cshow :: PlutusArgs -> String showsPrec :: Int -> PlutusArgs -> ShowS $cshowsPrec :: Int -> PlutusArgs -> ShowS Show) instance NFData PlutusArgs data ScriptTestContext = forall l. PlutusLanguage l => ScriptTestContext { () stcScript :: Plutus l , ScriptTestContext -> PlutusArgs stcArgs :: PlutusArgs } deriving instance Show ScriptTestContext instance NFData ScriptTestContext where rnf :: ScriptTestContext -> () rnf (ScriptTestContext Plutus l script PlutusArgs args) = forall a. NFData a => a -> () rnf Plutus l script seq :: forall a b. a -> b -> b `seq` forall a. NFData a => a -> () rnf PlutusArgs args