lean4-htt/tests/lean/run/343.lean
Kyle Miller 158979380e
feat: make Level -> MessageData coercion respect pp.mvars (#3980)
Adds `ppLevel` to the `PPFns` extension so that the coercion can pass
the pretty printing context (including the `pp.mvars` option setting) to
the `Level` formatter.
2024-04-24 14:23:42 +00:00

51 lines
1.4 KiB
Text

set_option pp.mvars false
structure CatIsh where
Obj : Type o
Hom : Obj → Obj → Type m
infixr:75 " ~> " => (CatIsh.Hom _)
structure FunctorIsh (C D : CatIsh) where
onObj : C.Obj → D.Obj
onHom : ∀ {s d : C.Obj}, (s ~> d) → (onObj s ~> onObj d)
abbrev Catish : CatIsh :=
{
Obj := CatIsh
Hom := FunctorIsh
}
universe m o
unif_hint (mvar : CatIsh) where
Catish.{m, o} =?= mvar |- mvar.Obj =?= CatIsh.{o, m}
structure CtxSyntaxLayerParamsObj where
Ct : CatIsh
/-- warning: declaration uses 'sorry' -/
#guard_msgs in
def CtxSyntaxLayerParams : CatIsh :=
{
Obj := CtxSyntaxLayerParamsObj
Hom := sorry
}
/--
error: stuck at solving universe constraint
max (_+1) (_+1) =?= max (_+1) (_+1)
while trying to unify
CatIsh.Obj.{max (max (_ + 1) (_ + 1)) _ _, max ((max (_ + 1) (_ + 1)) + 1) ((max _ _) + 1)}
Catish.{max (_ + 1) (_ + 1), max _ _} : Type (max ((max (_ + 1) (_ + 1)) + 1) ((max _ _) + 1))
with
CatIsh.{max _ _, max (_ + 1) (_ + 1)} : Type (max ((max _ _) + 1) ((max (_ + 1) (_ + 1)) + 1))
---
error: failed to solve universe constraint
max (_+1) (_+1) =?= max (_+1) (_+1)
while trying to unify
Catish.Obj : Type (max ((max (u_1 + 1) (u_2 + 1)) + 1) ((max u_3 u_4) + 1))
with
CatIsh : Type (max ((max u_4 u_3) + 1) ((max (u_4 + 1) (u_3 + 1)) + 1))
-/
#guard_msgs in
def CtxSyntaxLayerTy := CtxSyntaxLayerParams ~> Catish