plutus-tx-1.46.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusTx.Test.Util.Apply

Synopsis

Documentation

type family CompiledCodeFuncToHaskType t r where ... Source #

type family FinalType t where ... Source #

Equations

FinalType (a → b) = FinalType b 
FinalType a = a 

compiledCodeToHaskUnsafe ∷ ∀ uni fun a. CompiledCodeFuncToHask a (CompiledCodeIn uni fun (FinalType a)) uni fun ⇒ CompiledCodeIn uni fun a → CompiledCodeFuncToHaskType (CompiledCodeIn uni fun a) (CompiledCodeIn uni fun (FinalType a)) Source #

Same as compiledCodeToHask but is partial instead of returning `Either String`.

compiledCodeToHask ∷ ∀ uni fun a. CompiledCodeFuncToHask a (Either String (CompiledCodeIn uni fun (FinalType a))) uni fun ⇒ CompiledCodeIn uni fun a → CompiledCodeFuncToHaskType (CompiledCodeIn uni fun a) (Either String (CompiledCodeIn uni fun (FinalType a))) Source #

Transform CompiledCode function into a function in Hask. This helps applying arguments to already built script in a type safe manner. Example: ```hs foo :: CompiledCode (Integer -> () -> Bool) bar :: CompiledCode Integer baz :: CompiledCode ()

compiledCodeToHask foo bar baz :: Either String (CompiledCode ()) ```