@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
79 lines • 2.54 kB
TypeScript
/**
* @typedef {import("@helios-lang/compiler-utils").Site} Site
* @typedef {import("./common.js").InferenceMap} InferenceMap
* @typedef {import("./common.js").Func} Func
* @typedef {import("./common.js").EvalEntity} EvalEntity
* @typedef {import("./common.js").Parametric} Parametric
* @typedef {import("./common.js").Type} Type
* @typedef {import("./common.js").Typed} Typed
* @typedef {import("./common.js").TypeClass} TypeClass
*/
/**
* Func instances can be parametrics instances
* @implements {Parametric}
*/
export class ParametricFunc extends Common implements Parametric {
/**
* @param {Parameter[]} params
* @param {FuncType} fnType
*/
constructor(params: Parameter[], fnType: FuncType);
/**
* @private
* @readonly
* @type {Parameter[]}
*/
private readonly _params;
/**
* @private
* @readonly
* @type {FuncType}
*/
private readonly _fnType;
get params(): Parameter[];
get fnType(): FuncType;
/**
* null TypeClasses aren't included
* @type {TypeClass[]}
*/
get typeClasses(): import("./common.js").TypeClass[];
/**
* @param {Type[]} types
* @param {Site} site
* @returns {EvalEntity}
*/
apply(types: Type[], site?: Site): EvalEntity;
/**
* @type {Parametric}
*/
get asParametric(): import("./common.js").Parametric;
/**
* Must infer before calling
* @param {Site} site
* @param {Typed[]} args
* @param {{[name: string]: Typed}} namedArgs
* @param {Type[]} paramTypes - so that paramTypes can be accessed by caller
* @returns {Func}
*/
inferCall(site: Site, args: Typed[], namedArgs?: {
[name: string]: Typed;
}, paramTypes?: Type[]): Func;
/**
* @param {Site} site
* @param {InferenceMap} map
* @returns {Parametric}
*/
infer(site: Site, map: InferenceMap): Parametric;
}
export type Site = import("@helios-lang/compiler-utils").Site;
export type InferenceMap = import("./common.js").InferenceMap;
export type Func = import("./common.js").Func;
export type EvalEntity = import("./common.js").EvalEntity;
export type Parametric = import("./common.js").Parametric;
export type Type = import("./common.js").Type;
export type Typed = import("./common.js").Typed;
export type TypeClass = import("./common.js").TypeClass;
import { Common } from "./common.js";
import { Parameter } from "./Parameter.js";
import { FuncType } from "./common.js";
//# sourceMappingURL=ParametricFunc.d.ts.map