Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
PlutusTx.Test.Util.Apply
Synopsis
- type family CompiledCodeFuncToHaskType t r where ...
- type family FinalType t where ...
- 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))
- 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)))
Documentation
type family CompiledCodeFuncToHaskType t r where ... Source #
Equations
CompiledCodeFuncToHaskType (CompiledCodeIn uni fun (a → b)) r = CompiledCodeIn uni fun a → CompiledCodeFuncToHaskType (CompiledCodeIn uni fun b) r | |
CompiledCodeFuncToHaskType (CompiledCodeIn uni fun a) r = r |
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 ()) ```