File: .lake/packages/lean4/src/lean/Init/Dynamic.lean

full_name: _private.«.lake».packages.lean4.src.lean.Init.Dynamic.0.TypeNameData
code: private opaque TypeNameData (α : Type u) : NonemptyType.{0} 
goal: NonemptyType

full_name: _private.«.lake».packages.lean4.src.lean.Init.Dynamic.0.TypeName.data
code: /--
Dynamic type name information.
Types with an instance of `TypeName` can be stored in an `Dynamic`.
The type class contains the declaration name of the type,
which must not have any universe parameters
and be of type `Sort ..` (i.e., monomorphic).

The preferred way to declare instances of this type is using the derive
handler, which will internally use the unsafe `TypeName.mk` function.

Morally, this is the same as:
```lean
class TypeName (α : Type) where unsafe mk ::
  typeName : Name
```
-/
@[nospecialize]
class TypeName (α : Type u) where private mk' ::
  private data : (TypeNameData α).type
goal: (TypeNameData α).type

full_name: TypeName
code: /--
Dynamic type name information.
Types with an instance of `TypeName` can be stored in an `Dynamic`.
The type class contains the declaration name of the type,
which must not have any universe parameters
and be of type `Sort ..` (i.e., monomorphic).

The preferred way to declare instances of this type is using the derive
handler, which will internally use the unsafe `TypeName.mk` function.

Morally, this is the same as:
```lean
class TypeName (α : Type) where unsafe mk ::
  typeName : Name
```
-/
@[nospecialize]
class TypeName (α : Type u) where private mk' ::
  private data : (TypeNameData α).type
goal: Type

full_name: _private.«.lake».packages.lean4.src.lean.Init.Dynamic.0.TypeName.mk'
code: /--
Dynamic type name information.
Types with an instance of `TypeName` can be stored in an `Dynamic`.
The type class contains the declaration name of the type,
which must not have any universe parameters
and be of type `Sort ..` (i.e., monomorphic).

The preferred way to declare instances of this type is using the derive
handler, which will internally use the unsafe `TypeName.mk` function.

Morally, this is the same as:
```lean
class TypeName (α : Type) where unsafe mk ::
  typeName : Name
```
-/
@[nospecialize]
class TypeName (α : Type u) where private mk' ::
  private data : (TypeNameData α).type
goal: TypeName α

full_name: instNonemptyTypeName
code: instance : Nonempty (TypeName α) 
goal: Nonempty (TypeName α)

full_name: TypeName.mk
code: /--
Creates a `TypeName` instance.

For safety, it is required that the constant `typeName` is definitionally equal
to `α`.
-/
unsafe def TypeName.mk (α : Type u) (typeName : Name) : TypeName α 
goal: TypeName α

full_name: _private.«.lake».packages.lean4.src.lean.Init.Dynamic.0.TypeName.typeNameImpl
code: private unsafe def TypeName.typeNameImpl (α) [TypeName α] : Name 
goal: Lean.Name

full_name: TypeName.typeName
code: /--
Returns a declaration name of the type.
-/
@[implemented_by TypeName.typeNameImpl]
opaque TypeName.typeName (α) [TypeName α] : Name
goal: Lean.Name

full_name: _private.«.lake».packages.lean4.src.lean.Init.Dynamic.0.DynamicPointed
code: private opaque DynamicPointed : NonemptyType.{0} 
goal: NonemptyType

full_name: Dynamic
code: /--
Type-tagged union that can store any type with a `TypeName` instance.

This is roughly equivalent to `(α : Type) × TypeName α × α` but without the
universe bump.
-/
def Dynamic : Type 
goal: Type

full_name: instNonemptyDynamic
code: instance : Nonempty Dynamic 
goal: Nonempty Dynamic

full_name: _private.«.lake».packages.lean4.src.lean.Init.Dynamic.0.Dynamic.typeNameImpl
code: private unsafe def Dynamic.typeNameImpl (any : Dynamic) : Name 
goal: Lean.Name

full_name: Dynamic.typeName
code: /--
The name of the type of the value stored in the `Dynamic`.
-/
@[implemented_by Dynamic.typeNameImpl]
opaque Dynamic.typeName (any : Dynamic) : Name
goal: Lean.Name

full_name: _private.«.lake».packages.lean4.src.lean.Init.Dynamic.0.Dynamic.get?Impl
code: private unsafe def Dynamic.get?Impl (α) (any : Dynamic) [TypeName α] : Option α 
goal: Option α

full_name: Dynamic.get?
code: /--
Retrieves the value stored in the `Dynamic`.
Returns `some a` if the value has the right type, and `none` otherwise.
-/
@[implemented_by Dynamic.get?Impl]
opaque Dynamic.get? (α) (any : Dynamic) [TypeName α] : Option α
goal: Option α

full_name: _private.«.lake».packages.lean4.src.lean.Init.Dynamic.0.Dynamic.mkImpl
code: private unsafe def Dynamic.mkImpl [TypeName α] (obj : α) : Dynamic 
goal: Dynamic

full_name: Dynamic.mk
code: @[implemented_by Dynamic.mkImpl]
opaque Dynamic.mk [TypeName α] (obj : α) : Dynamic
goal: Dynamic