plutus-core-1.60.0.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusIR.Compiler.Datatype

Description

Functions for compiling let-bound PIR datatypes into PLC.

Synopsis

mkScottTy :: MonadQuote m => ann -> Datatype TyName Name uni ann -> m (Type TyName uni ann) #

Make the "Scott-encoded" type for a Datatype, with type variables free. This is exactly the type of an eliminator function for the datatype.

mkScottTy Maybe = forall out_Maybe. out_Maybe -> (a -> out_Maybe) -> out_Maybe

resultTypeName :: MonadQuote m => Datatype TyName Name uni a -> m TyName #