@helios-lang/compiler
Version:
Helios is a Domain Specific Language that compiles to Plutus-Core (i.e. Cardano on-chain validator scripts). Helios is a non-Haskell alternative to Plutus. With this library you can compile Helios scripts and build Cardano transactions, all you need to bu
91 lines • 2.57 kB
TypeScript
/**
* @import { Site } from "@helios-lang/compiler-utils"
* @typedef {import("@helios-lang/ir").SourceMappedStringI} SourceMappedStringI
* @typedef {import("../typecheck/index.js").EvalEntity} EvalEntity
* @typedef {import("../typecheck/index.js").Type} Type
*/
/**
* (..) -> RetTypeExpr {...} expression
* @internal
*/
export class FuncLiteralExpr extends Expr {
/**
* @param {Site} site
* @param {FuncArg[]} args
* @param {Expr | undefined} retTypeExpr
* @param {Expr} bodyExpr
*/
constructor(site: Site, args: FuncArg[], retTypeExpr: Expr | undefined, bodyExpr: Expr);
/**
* @readonly
* @type {FuncArg[]}
*/
readonly args: FuncArg[];
/**
* @readonly
* @type {Expr | undefined}
*/
readonly retTypeExpr: Expr | undefined;
/**
* @private
* @readonly
* @type {Expr}
*/
private readonly _bodyExpr;
/**
* @type {number}
*/
get nArgs(): number;
/**
* @type {string[]}
*/
get argNames(): string[];
/**
* @type {Type[]}
*/
get argTypes(): import("../typecheck/common.js").Type[];
/**
* @type {string[]}
*/
get argTypeNames(): string[];
/**
* @type {Expr}
*/
get retExpr(): Expr;
/**
* @type {Type}
*/
get retType(): import("../typecheck/common.js").Type;
/**
* @param {Scope} scope
* @returns {FuncType}
*/
evalType(scope: Scope): FuncType;
isMethod(): boolean;
/**
* @returns {SourceMappedStringI}
*/
argsToIR(): SourceMappedStringI;
/**
* In reverse order, because later opt args might depend on earlier args
* @param {ToIRContext} ctx
* @param {SourceMappedStringI} innerIR
* @returns {SourceMappedStringI}
*/
wrapWithDefaultArgs(ctx: ToIRContext, innerIR: SourceMappedStringI): SourceMappedStringI;
/**
* @param {ToIRContext} ctx
* @returns {SourceMappedStringI}
*/
toIRInternal(ctx: ToIRContext): SourceMappedStringI;
}
export type SourceMappedStringI = import("@helios-lang/ir").SourceMappedStringI;
export type EvalEntity = import("../typecheck/index.js").EvalEntity;
export type Type = import("../typecheck/index.js").Type;
import { Expr } from "./Expr.js";
import { FuncArg } from "./FuncArg.js";
import { Scope } from "../scopes/index.js";
import { FuncType } from "../typecheck/index.js";
import { ToIRContext } from "../codegen/index.js";
import type { Site } from "@helios-lang/compiler-utils";
//# sourceMappingURL=FuncLiteralExpr.d.ts.map