Added These data types
This commit is contained in:
parent
86182ced25
commit
43cd0c4507
6 changed files with 114 additions and 139 deletions
12
src/Plutarch/These.hs
Normal file
12
src/Plutarch/These.hs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
module Plutarch.These (PThese (..)) where
|
||||
|
||||
import GHC.Generics qualified as GHC
|
||||
import Generics.SOP
|
||||
|
||||
-- | Plutus These type with Scott-encoded representation.
|
||||
data PThese (a :: PType) (b :: PType) (s :: S)
|
||||
= PThis (Term s a)
|
||||
| PThat (Term s b)
|
||||
| PThese (Term s a) (Term s b)
|
||||
deriving stock (GHC.Generic)
|
||||
deriving anyclass (Generic, PlutusType)
|
||||
Loading…
Add table
Add a link
Reference in a new issue