Documentation
Lean
.
Compiler
.
ClosedTermCache
Search
return to top
source
Imports
Lean.Environment
Imported by
Lean
.
ClosedTermCache
Lean
.
instInhabitedClosedTermCache
Lean
.
closedTermCacheExt
Lean
.
cacheClosedTermName
Lean
.
getClosedTermName?
Lean
.
isClosedTermName
source
structure
Lean
.
ClosedTermCache
:
Type
map :
PHashMap
Expr
Name
constNames :
NameSet
revExprs :
List
Expr
Instances For
source
instance
Lean
.
instInhabitedClosedTermCache
:
Inhabited
ClosedTermCache
Equations
Lean.instInhabitedClosedTermCache
=
{
default
:=
{
map
:=
default
,
constNames
:=
default
,
revExprs
:=
default
}
}
source
opaque
Lean
.
closedTermCacheExt
:
EnvExtension
ClosedTermCache
source
def
Lean
.
cacheClosedTermName
(
env
:
Environment
)
(
e
:
Expr
)
(
n
:
Name
)
:
Environment
Equations
One or more equations did not get rendered due to their size.
Instances For
source
def
Lean
.
getClosedTermName?
(
env
:
Environment
)
(
e
:
Expr
)
:
Option
Name
Equations
Lean.getClosedTermName?
env
e
=
Lean.PersistentHashMap.find?
(
Lean.closedTermCacheExt
.
getState
env
)
.
map
e
Instances For
source
def
Lean
.
isClosedTermName
(
env
:
Environment
)
(
n
:
Name
)
:
Bool
Equations
Lean.isClosedTermName
env
n
=
(
Lean.closedTermCacheExt
.
getState
env
)
.
constNames
.
contains
n
Instances For