lean4-htt/tests/lean/coeM.lean
Kyle Miller 321ef5b956
fix: make Lean.Internal.liftCoeM and Lean.Internal.coeM unfold (#3404)
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.
2024-02-27 22:17:46 +00:00

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)