shake core types #
This file copies types and functions from Lake.CLI.Shake wholesale in order to make them public,
with some modifications to Needs in order to suit our purposes (namely, we benefit from keeping
track of private dependence in order to uniformly handle declarations from the same file, whereas
shake can get away with handling import all specially.)
More utilities on these types are defined in ImportGraph.Shake.Basic.
Bitset #
This section is copied without modification, and should be removed if Shake API becomes public.
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- ImportGraph.Shake.Bitset.instInter = { inter := fun (a b : ImportGraph.Shake.Bitset) => { toNat := a.toNat &&& b.toNat } }
Equations
- ImportGraph.Shake.Bitset.instUnion = { union := fun (a b : ImportGraph.Shake.Bitset) => { toNat := a.toNat ||| b.toNat } }
Equations
- ImportGraph.Shake.Bitset.instXorOp = { xor := fun (a b : ImportGraph.Shake.Bitset) => { toNat := a.toNat ^^^ b.toNat } }
Needs and NeedsKind #
This section is modified from shake's version to allow us to reason about import alls in the
import hierarchy instead of dynamically.
An "atomic" module dependency. Note that we consider an inclusion of the public scope and an
inclusion of the private scope to be two separate dependencies. Modules may be related by multiple
NeedsKinds; the presence of any NeedsKind implies some dependency between the modules.
- isExported : Bool
Represents
public (meta)? import: an import of the public scope of the source into the public scope of the target.falsemeans that the public scope of the source is instead imported into the private scope of the target. - isMeta : Bool
Represents
(public)? meta import (all)?: a lifting of non-meta declarations to the meta phase. - isAll : Bool
Represents
(meta)? import all: an import of the private scope into the private scope.falsemeans the private scope of the source is not accessed.
Instances For
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
- ImportGraph.Shake.instBEqNeedsKind.beq x✝¹ x✝ = false
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- ImportGraph.Shake.NeedsKind.priv = { isExported := false, isMeta := false, not_isExported_and_isAll := ImportGraph.Shake.NeedsKind.priv._proof_2 }
Instances For
Equations
- ImportGraph.Shake.NeedsKind.pub = { isExported := true, isMeta := false, not_isExported_and_isAll := ImportGraph.Shake.NeedsKind.pub._proof_2 }
Instances For
Equations
- ImportGraph.Shake.NeedsKind.metaPriv = { isExported := false, isMeta := true, not_isExported_and_isAll := ImportGraph.Shake.NeedsKind.priv._proof_2 }
Instances For
Equations
- ImportGraph.Shake.NeedsKind.metaPub = { isExported := true, isMeta := true, not_isExported_and_isAll := ImportGraph.Shake.NeedsKind.pub._proof_2 }
Instances For
Equations
- ImportGraph.Shake.NeedsKind.privOfPriv = { isExported := false, isMeta := false, isAll := true, not_isExported_and_isAll := ImportGraph.Shake.NeedsKind.privOfPriv._proof_2 }
Instances For
Equations
- ImportGraph.Shake.NeedsKind.metaPrivOfPriv = { isExported := false, isMeta := true, isAll := true, not_isExported_and_isAll := ImportGraph.Shake.NeedsKind.privOfPriv._proof_2 }
Instances For
Equations
- k.unsetIsAll = { isExported := k.isExported, isMeta := k.isMeta, not_isExported_and_isAll := ⋯ }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Assumes that ¬(imp.isExported ∧ imp.importAll).
Equations
- ImportGraph.Shake.NeedsKind.ofImport { module := module, importAll := importAll, isMeta := true } = ImportGraph.Shake.NeedsKind.metaPub
- ImportGraph.Shake.NeedsKind.ofImport { module := module, importAll := importAll } = ImportGraph.Shake.NeedsKind.pub
- ImportGraph.Shake.NeedsKind.ofImport { module := module, isExported := false, isMeta := true } = ImportGraph.Shake.NeedsKind.metaPriv
- ImportGraph.Shake.NeedsKind.ofImport { module := module, isExported := false } = ImportGraph.Shake.NeedsKind.priv
- ImportGraph.Shake.NeedsKind.ofImport { module := module, importAll := true, isExported := false } = ImportGraph.Shake.NeedsKind.privOfPriv
- ImportGraph.Shake.NeedsKind.ofImport { module := module, importAll := true, isExported := false, isMeta := true } = ImportGraph.Shake.NeedsKind.metaPrivOfPriv
Instances For
An import effecting a NeedsKind.
Equations
- ImportGraph.Shake.NeedsKind.toImport module k = { module := module, importAll := k.isAll, isExported := k.isExported, isMeta := k.isMeta }
Instances For
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
An abbreviation for Needs, but intended to express what is provided to a given scope.
Notably, we expect this to be both transitively closed and linearized (i.e., to have also taken
public ⊆ private into account) but do not enforce this for ease of building up Provides.
Instances For
Equations
- ImportGraph.Shake.instEmptyCollectionNeeds = { emptyCollection := ImportGraph.Shake.Needs.empty }
Equations
- needs.get { isExported := true, isMeta := false, not_isExported_and_isAll := ⋯ } = needs.pub
- needs.get { isExported := false, isMeta := false, not_isExported_and_isAll := ⋯ } = needs.priv
- needs.get { isExported := true, isMeta := true, not_isExported_and_isAll := ⋯ } = needs.metaPub
- needs.get { isExported := false, isMeta := true, not_isExported_and_isAll := ⋯ } = needs.metaPriv
- needs.get { isExported := false, isMeta := false, isAll := true, not_isExported_and_isAll := ⋯ } = needs.privOfPriv
- needs.get { isExported := false, isMeta := true, isAll := true, not_isExported_and_isAll := ⋯ } = needs.metaPrivOfPriv
Instances For
Equations
- One or more equations did not get rendered due to their size.