# E4078

Cannot derive trait for type.

MoonBit allows you to derive implementation of some traits for your types.
However, not all types can be automatically derived. For example, you cannot
derive a trait for an abstract type.

## Erroneous example

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

## Suggestion

You can implement the trait manually:

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