ekmett / bifunctors

Haskell 98 bifunctors, bifoldables and bitraversables
Other
57 stars 42 forks source link

Fix #89 by strategically using underscore-prefixed variable names #90

Closed RyanGlScott closed 3 years ago

RyanGlScott commented 3 years ago

Normally, I like to avoid using underscores in the names of TH-generated variables, as they can sometimes mask bugs in TH code generation. In the case of #89, however, it was observed that deriveBifoldable can genuinely generate code where one of the variables in a lambda expression is never used. This fixes #89 by prefixes those variables with an underscore to avoid the generated code from triggering -Wunused-matches warnings.