The elaboration function `Lean.Meta.coerceMonadLift?` inserts these coercion helper functions into a term and tries to unfolded them with `expandCoe`, but because that function only unfolds up to reducible-and-instance transparency, these functions were not being unfolded. The fix here is to give them the `@[reducible]` attribute.
17 lines
314 B
Text
17 lines
314 B
Text
/-
|
|
# Testing monad lift coercion elaborator
|
|
|
|
The functions inserted for the coercions are supposed to be inlined immediately during elaboration.
|
|
-/
|
|
|
|
variable (p : Nat → Prop) (m : IO (Subtype p))
|
|
|
|
/-!
|
|
`Lean.Internal.liftCoeM`
|
|
-/
|
|
#check (m : (ReaderT Int IO) Nat)
|
|
|
|
/-!
|
|
`Lean.Internal.coeM`
|
|
-/
|
|
#check (m : IO Nat)
|