plutus-tx-plugin-1.38.0.0: The Plutus Tx compiler and GHC plugin
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusTx.Compiler.Type

Description

Functions for compiling GHC types into PlutusCore types, as well as compiling constructors, matchers, and pattern match alternatives.

Synopsis

Documentation

compileTypeNormCompilingDefault uni fun m ann ⇒ Type → m (PIRType uni) Source #

Compile a type, first of all normalizing it to remove type family redexes.

Generally, we need to call this whenever we are compiling a "new" type from the program. If we are compiling a part of a type we are already processing then it has likely been normalized and we can just use compileType

compileTypeCompilingDefault uni fun m ann ⇒ Type → m (PIRType uni) Source #

Compile a type.

compileKindCompiling uni fun m ann ⇒ Kind → m (Kind ()) Source #

getDataConsCompiling uni fun m ann ⇒ TyCon → m [DataCon] Source #

getConstructorsCompilingDefault uni fun m ann ⇒ TyCon → m [PIRTerm uni fun] Source #

Get the constructors of the given TyCon as PLC terms.

getMatchCompilingDefault uni fun m ann ⇒ TyCon → m (PIRTerm uni fun) Source #

Get the matcher of the given TyCon as a PLC term

getMatchInstantiatedCompilingDefault uni fun m ann ⇒ Type → m (PIRTerm uni fun) Source #

Get the matcher of the given Type (which must be equal to a type constructor application) as a PLC term instantiated for the type constructor argument types.