File: .lake/packages/lean4/src/lean/Lean/Meta/Check.lean

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Check.0.Lean.Meta.ensureType
code: private def ensureType (e : Expr) : MetaM Unit 
goal: Lean.MetaM Unit

full_name: Lean.Meta.throwLetTypeMismatchMessage
code: def throwLetTypeMismatchMessage {α} (fvarId : FVarId) : MetaM α 
goal: Lean.MetaM α

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Check.0.Lean.Meta.checkConstant
code: private def checkConstant (constName : Name) (us : List Level) : MetaM Unit 
goal: Lean.MetaM Unit

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Check.0.Lean.Meta.getFunctionDomain
code: private def getFunctionDomain (f : Expr) : MetaM (Expr × BinderInfo) 
goal: Lean.MetaM (Lean.Expr × Lean.BinderInfo)

full_name: Lean.Meta.addPPExplicitToExposeDiff.hasExplicitDiff?
code: /--
Given two expressions `a` and `b`, this method tries to annotate terms with `pp.explicit := true` to
expose "implicit" differences. For example, suppose `a` and `b` are of the form
```lean
@HashMap Nat Nat eqInst hasInst1
@HashMap Nat Nat eqInst hasInst2
```
By default, the pretty printer formats both of them as `HashMap Nat Nat`.
So, counterintuitive error messages such as
```lean
error: application type mismatch
  HashMap.insert m
argument
  m
has type
  HashMap Nat Nat
but is expected to have type
  HashMap Nat Nat
```
would be produced.
By adding `pp.explicit := true`, we can generate the more informative error
```lean
error: application type mismatch
  HashMap.insert m
argument
  m
has type
  @HashMap Nat Nat eqInst hasInst1
but is expected to have type
  @HashMap Nat Nat eqInst hasInst2
```
Remark: this method implements a simple heuristic, we should extend it as we find other counterintuitive
error messages.
-/
partial def addPPExplicitToExposeDiff (a b : Expr) : MetaM (Expr × Expr) 
goal: Lean.MetaM (Option (Array Lean.Expr × Array Lean.Expr))

full_name: Lean.Meta.addPPExplicitToExposeDiff.visit
code: /--
Given two expressions `a` and `b`, this method tries to annotate terms with `pp.explicit := true` to
expose "implicit" differences. For example, suppose `a` and `b` are of the form
```lean
@HashMap Nat Nat eqInst hasInst1
@HashMap Nat Nat eqInst hasInst2
```
By default, the pretty printer formats both of them as `HashMap Nat Nat`.
So, counterintuitive error messages such as
```lean
error: application type mismatch
  HashMap.insert m
argument
  m
has type
  HashMap Nat Nat
but is expected to have type
  HashMap Nat Nat
```
would be produced.
By adding `pp.explicit := true`, we can generate the more informative error
```lean
error: application type mismatch
  HashMap.insert m
argument
  m
has type
  @HashMap Nat Nat eqInst hasInst1
but is expected to have type
  @HashMap Nat Nat eqInst hasInst2
```
Remark: this method implements a simple heuristic, we should extend it as we find other counterintuitive
error messages.
-/
partial def addPPExplicitToExposeDiff (a b : Expr) : MetaM (Expr × Expr) 
goal: Lean.MetaM (Lean.Expr × Lean.Expr)

full_name: Lean.Meta.addPPExplicitToExposeDiff
code: /--
Given two expressions `a` and `b`, this method tries to annotate terms with `pp.explicit := true` to
expose "implicit" differences. For example, suppose `a` and `b` are of the form
```lean
@HashMap Nat Nat eqInst hasInst1
@HashMap Nat Nat eqInst hasInst2
```
By default, the pretty printer formats both of them as `HashMap Nat Nat`.
So, counterintuitive error messages such as
```lean
error: application type mismatch
  HashMap.insert m
argument
  m
has type
  HashMap Nat Nat
but is expected to have type
  HashMap Nat Nat
```
would be produced.
By adding `pp.explicit := true`, we can generate the more informative error
```lean
error: application type mismatch
  HashMap.insert m
argument
  m
has type
  @HashMap Nat Nat eqInst hasInst1
but is expected to have type
  @HashMap Nat Nat eqInst hasInst2
```
Remark: this method implements a simple heuristic, we should extend it as we find other counterintuitive
error messages.
-/
partial def addPPExplicitToExposeDiff (a b : Expr) : MetaM (Expr × Expr) 
goal: Lean.MetaM (Lean.Expr × Lean.Expr)

full_name: Lean.Meta.mkHasTypeButIsExpectedMsg
code: /--
  Return error message "has type{givenType}\nbut is expected to have type{expectedType}"
-/
def mkHasTypeButIsExpectedMsg (givenType expectedType : Expr) : MetaM MessageData 
goal: Lean.MetaM Lean.MessageData

full_name: Lean.Meta.throwAppTypeMismatch
code: def throwAppTypeMismatch (f a : Expr) : MetaM α 
goal: Lean.MetaM α

full_name: Lean.Meta.checkApp
code: def checkApp (f a : Expr) : MetaM Unit 
goal: Lean.MetaM Unit

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Check.0.Lean.Meta.checkAux.check
code: private partial def checkAux (e : Expr) : MetaM Unit 
goal: Lean.MonadCacheT Lean.ExprStructEq Unit Lean.MetaM Unit

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Check.0.Lean.Meta.checkAux
code: private partial def checkAux (e : Expr) : MetaM Unit 
goal: Lean.MetaM Unit

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Check.0.Lean.Meta.checkAux.checkForall
code: private partial def checkAux (e : Expr) : MetaM Unit 
goal: Lean.MonadCacheT Lean.ExprStructEq Unit Lean.MetaM Unit

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Check.0.Lean.Meta.checkAux.checkLambdaLet
code: private partial def checkAux (e : Expr) : MetaM Unit 
goal: Lean.MonadCacheT Lean.ExprStructEq Unit Lean.MetaM Unit

full_name: Lean.Meta.check
code: /--
Throw an exception if `e` is not type correct.
-/
def check (e : Expr) : MetaM Unit 
goal: Lean.MetaM Unit

full_name: Lean.Meta.isTypeCorrect
code: /--
Return true if `e` is type correct.
-/
def isTypeCorrect (e : Expr) : MetaM Bool 
goal: Lean.MetaM Bool

full_name: Lean.Meta.initFn._@..lake.packages.lean4.src.lean.Lean.Meta.Check._hyg.2782
code: builtin_initialize
  registerTraceClass `Meta.check
goal: IO Unit