You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defzero (α : Type) : Nat := 0/-- `Type` のラッパー -/structureAltTypewherebase : TypedefA : AltType := ⟨Nat⟩
/--error: application type mismatch zero Aargument Ahas type AltType : Type 1but is expected to have type Type : Type 1-/
#guard_msgs in#eval zero A
instance : Coe AltType Type := ⟨fun S ↦ S.base⟩
-- ちゃんと評価できる#eval zero A
The text was updated successfully, but these errors were encountered:
Coe
とどう違うのかの説明が間違っている。現状の説明では、「型宇宙へ」強制する場合には CoeSort でないといけないかのように見えるが、以下のようにCoe
で型宇宙への強制を行うことができる。Coe
とCoeSort
の違いは、「強制のトリガーがどこにあるのか」で説明すべき。The text was updated successfully, but these errors were encountered: