In Haskell, DerivingVia is a deriving strategy generalizing GeneralizedNewtypeDeriving. DerivingVia allows deriving instances of a type using a via type that is representationally equal to it which determines the instance behavior. Unlike GND, DerivingVia works for both 'data' and 'newtype' declarations and is not limited to a single behavior.
For details, consult the GHC manual section on Deriving via.