Replace `Wrapped`
Clarification and motivation
Wrapped
is a thing from lens
which allows understanding newtype content.
It would be nice to replace it with a custom typeclass for a couple of reasons:
-
Wrapped
cannot be used withinderiving anyclass
clause, one has to declare a standalone instance, and if we make a copy ofWrapped
with the type family but without methods, then the problem will be resolved. - Our custom typeclass can be documented, it would be nice to have exact use cases for it described.
Also, let's clarify documentation for To be done in #89 (closed).CanCastTo
in this issue - mention when it should be used (and when not).
Acceptance criteria
-
Wrapped
is replaced. CanCastTo
documentation is updated, maybe overall documentation ofLorentz.Coercible
is updated to have a "use case -> which function to use" map.
Edited by Ivan Gromakovskii