Zulip Chat Archive
Stream: new members
Topic: Lifting structures to aliased types
Kevin Sullivan (May 08 2023 at 18:05):
Hi everyone, what's the standard way to lift structures/operations associated with a type, Q, to a new new type, obtained by def R := Q?
Kevin Buzzard (May 08 2023 at 18:07):
You can use @[derive foo]
to lift the typeclass instance foo
from Q to R (write it just before the definition of R), and @[derive [foo,bar,baz]]
if you want to lift more than one.
Kevin Sullivan (May 08 2023 at 18:13):
Kevin Buzzard said:
You can use
@[derive foo]
to lift the typeclass instancefoo
from Q to R (write it just before the definition of R), and@[derive [foo,bar,baz]]
if you want to lift more than one.
Thank you, Kevin. --K
Last updated: Dec 20 2023 at 11:08 UTC