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

PlutusTx.Compiler.Names

Description

Functions for compiling GHC names into Plutus Core names.

Synopsis

Documentation

lookupNameScope uni → NameMaybe (PLCVar uni) Source #

getUntidiedOccStringNameString Source #

Reverses the OccName tidying that GHC does, see tidyOccEnv and accompanying Notes.

This is bad, because it makes it much harder to read since the disambiguating numbers are gone. However, these appear to be non-deterministic (possibly depending on the order in which modules are processed?), so we can't rely on them.

Essentially, we just strip off trailing digits. This might remove "real" digits added by the user, but there's not much we can do about that.

Note that this only affects the *textual* name, not the underlying unique, so it has no effect on the behaviour of the program, merely on how it is printed.

compileVarFreshCompilingDefault uni fun m ann ⇒ AnnVar → m (PLCVar uni) Source #

compileVarWithTyFreshCompilingDefault uni fun m ann ⇒ AnnVarPIRType uni → m (PLCVar uni) Source #

Like compileVarFresh, but takes a PIRType instead of obtaining the PIR type from the given Expr.

compileTyVarFreshCompiling uni fun m ann ⇒ TyVar → m PLCTyVar Source #

compileTcTyVarFreshCompiling uni fun m ann ⇒ TyCon → m PLCTyVar Source #

pushNameNamePLCVar uni → Scope uni → Scope uni Source #

pushNames ∷ [(Name, PLCVar uni)] → Scope uni → Scope uni Source #

pushTyNameNamePLCTyVarScope uni → Scope uni Source #

pushTyNames ∷ [(Name, PLCTyVar)] → Scope uni → Scope uni Source #