# E4077

Don't know how to derive trait for type.

MoonBit allows you to derive implementation of some pre-defined traits for your
types. It means that you cannot have MoonBit automatically derive a trait that
you defined yourself.

## Erroneous example

```{literalinclude} /sources/error_codes/4077_error/top.mbt
:language: moonbit
```

## Suggestion

You can implement the trait manually:

```{literalinclude} /sources/error_codes/4077_fixed/top.mbt
:language: moonbit
```
