plutus-core-0.1.0.0: Language library for Plutus Core
Safe HaskellNone
LanguageHaskell2010

PlutusCore.StdLib.Meta.Data.Function

Description

Meta-functions relating to functions.

Synopsis

Documentation

constPartial :: TermLike term TyName Name uni fun => term () -> term () Source #

const as a PLC term.

constPartial t = /\(A :: *) -> \(x : A) -> t

etaExpand :: TermLike term TyName Name uni fun => Type TyName uni () -> term () -> term () Source #

Eta-expand a function at a given type. Note that this has to be a "meta" function for it not force the function it receives and instead directly hide it under a lambda.

etaExpand ty fun = \(x : ty) -> fun x