Hadrian: fix warnings (#22783)
This change fixes the following warnings when building Hadrian:
src/Hadrian/Expression.hs:38:10: warning: [-Wredundant-constraints]
src/Hadrian/Expression.hs:84:13: warning: [-Wtype-equality-requires-operators]
src/Hadrian/Expression.hs:84:21: warning: [-Wtype-equality-requires-operators]
src/Hadrian/Haskell/Cabal/Parse.hs:67:1: warning: [-Wunused-imports]