(cls, instance)
| 204 | return LeanInductiveValue(cls._type_name, cls._ctor_name, cls._tag, converted) |
| 205 | |
| 206 | def __instancecheck__(cls, instance): |
| 207 | if isinstance(instance, LeanInductiveValue): |
| 208 | return instance.ctor == cls._ctor_name and instance._type_name == cls._type_name |
| 209 | if type(instance) is _CtorMeta: |
| 210 | # Allow isinstance(Color.red, Color.red) — both are _CtorMeta classes |
| 211 | return instance._ctor_name == cls._ctor_name and instance._type_name == cls._type_name |
| 212 | return False |
| 213 | |
| 214 | def __repr__(cls): |
| 215 | return f"{cls._type_name}.{cls._ctor_name}" |
nothing calls this directly
no outgoing calls
no test coverage detected