A custom target's declarative configuration.
- build : Lake.NPackage pkgName → Lake.FetchM (Lake.CustomData (pkgName, name))
The target's build function.
- getJob : Lake.CustomData (pkgName, name) → Lake.BuildJob Unit
The target's resulting build job.
Instances For
Equations
- Lake.instInhabitedTargetConfig = { default := { build := default, getJob := default } }
@[inline]
def
Lake.mkTargetJobConfig
{pkgName : Lake.Name}
{α : Type}
{name : Lake.Name}
(build : Lake.NPackage pkgName → Lake.FetchM (Lake.BuildJob α))
[h : Lake.FamilyOut Lake.CustomData (pkgName, name) (Lake.BuildJob α)]
:
Lake.TargetConfig pkgName name
A smart constructor for target configurations that generate CLI targets.
Equations
- Lake.mkTargetJobConfig build = { build := cast ⋯ build, getJob := fun (data : Lake.CustomData (pkgName, name)) => discard (Lake.ofFamily data) }
Instances For
A dependently typed configuration based on its registered package and name.
- pkg : Lake.Name
- name : Lake.Name
- config : Lake.TargetConfig self.pkg self.name
Instances For
@[implemented_by Lake.OpaqueTargetConfig.unsafeGet]
opaque
Lake.OpaqueTargetConfig.get
{pkgName : Lake.Name}
{name : Lake.Name}
:
Lake.OpaqueTargetConfig pkgName name → Lake.TargetConfig pkgName name
unsafe def
Lake.OpaqueTargetConfig.unsafeMk
{pkgName : Lake.Name}
{name : Lake.Name}
:
Lake.TargetConfig pkgName name → Lake.OpaqueTargetConfig pkgName name
Equations
- Lake.OpaqueTargetConfig.unsafeMk = unsafeCast
Instances For
unsafe def
Lake.OpaqueTargetConfig.unsafeGet
{pkgName : Lake.Name}
{name : Lake.Name}
:
Lake.OpaqueTargetConfig pkgName name → Lake.TargetConfig pkgName name
Equations
- Lake.OpaqueTargetConfig.unsafeGet = unsafeCast
Instances For
@[implemented_by Lake.OpaqueTargetConfig.unsafeMk]
opaque
Lake.OpaqueTargetConfig.mk
{pkgName : Lake.Name}
{name : Lake.Name}
:
Lake.TargetConfig pkgName name → Lake.OpaqueTargetConfig pkgName name
instance
Lake.OpaqueTargetConfig.instCoeTargetConfig
{pkgName : Lake.Name}
{name : Lake.Name}
:
Coe (Lake.TargetConfig pkgName name) (Lake.OpaqueTargetConfig pkgName name)
Equations
- Lake.OpaqueTargetConfig.instCoeTargetConfig = { coe := Lake.OpaqueTargetConfig.mk }
instance
Lake.OpaqueTargetConfig.instCoeTargetConfig_1
{pkgName : Lake.Name}
{name : Lake.Name}
:
Coe (Lake.OpaqueTargetConfig pkgName name) (Lake.TargetConfig pkgName name)
Equations
- Lake.OpaqueTargetConfig.instCoeTargetConfig_1 = { coe := Lake.OpaqueTargetConfig.get }
instance
Lake.OpaqueTargetConfig.instInhabitedOfTargetConfig
{pkgName : Lake.Name}
{name : Lake.Name}
[Inhabited (Lake.TargetConfig pkgName name)]
:
Inhabited (Lake.OpaqueTargetConfig pkgName name)
Equations
- Lake.OpaqueTargetConfig.instInhabitedOfTargetConfig = { default := Lake.OpaqueTargetConfig.mk default }
def
Lake.Package.findTargetConfig?
(name : Lake.Name)
(self : Lake.Package)
:
Option (Lake.TargetConfig self.name name)
Try to find a target configuration in the package with the given name .
Equations
- Lake.Package.findTargetConfig? name self = Option.map (fun (x : Lake.OpaqueTargetConfig self.config.name name) => x.get) (Lake.DRBMap.find? self.opaqueTargetConfigs name)