Zulip Chat Archive
Stream: lean4
Topic: Implicit conversion
Leni Aniva (Sep 25 2024 at 04:38):
How does the implicit conversion of some x: X
into .some x: Option X
work? If I have my own option-like type, how can I implement this implicit conversion?
Henrik Böving (Sep 25 2024 at 06:23):
Through docs#Coe and related type classes
Tom (Sep 25 2024 at 18:32):
This is a very good introduction covering the basics: https://leanprover.github.io/functional_programming_in_lean/type-classes/coercion.html
Last updated: May 02 2025 at 03:31 UTC