IaFP / ghc

A slightly more Glorious Haskell Compiler
Other
2 stars 0 forks source link

False positive warnings for no explicit declaration of `$wf'` associated types #23

Closed fxdpntthm closed 2 years ago

fxdpntthm commented 2 years ago

You may see warning like

compiler/GHC/Core/Map/Expr.hs:110:1: warning: [-Wmissing-methods]
    • No explicit associated type or default declaration for ‘$wf'Key’
    • In the instance declaration for ‘TrieMap CoreMap’
    |
110 | instance TrieMap CoreMap where
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

This is because we build those axioms after the validity check. A better way would be to do it before the validity check.