Is the functor distribution law for the `Alt` typeclass trivial?
While it isn't the consensus of the other answers and comments, this is not a natural property of "real-world" Haskell.
It is helpful to developers who write non-parametric code to know when they should add constraints to remain compatible with code which takes parametricity for granted.
A badly-behaved example
{-# LANGUAGE GADTs #-}
data Badly a where
End :: a -> Badly a
Cons :: a -> Badly b -> Badly a
(<++>) :: Badly a -> Badly b -> Badly a
(End a) <++> r = Cons a r
(Cons a l) <++> r = Cons a (l <++> r)
instance Functor Badly where
fmap f (End a) = End (f a)
fmap f (Cons a r) = Cons (f a) r
instance Alt f where
(<!>) = (<++>)
Yes the law holds for free, by parametricity.
Even then, these laws still have value.
It allows people to be aware of them without being adepts of programming language theory.
You will want to have these laws around if you port these interfaces to languages with weaker type systems.
Until Haskell is actually given formal semantics, we technically don't know that those free theorems hold. By sufficiently high standards of formality, it's not enough to pretend that Haskell is a pure polymorphic lambda-calculus. So we might as well add and check these "free" laws just in case.