Commit 74d40186 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Switch on -XEmptyCase when renaming derived declarations

Compiler-generated code can have empty cases
parent e52d9d46
...@@ -401,7 +401,9 @@ renameDeriv is_boot inst_infos bagBinds ...@@ -401,7 +401,9 @@ renameDeriv is_boot inst_infos bagBinds
, emptyValBindsOut, usesOnly (plusFVs fvs)) } , emptyValBindsOut, usesOnly (plusFVs fvs)) }
| otherwise | otherwise
= discardWarnings $ -- Discard warnings about unused bindings etc = discardWarnings $ -- Discard warnings about unused bindings etc
setXOptM Opt_EmptyCase $ -- Derived decls (for empty types) can have
-- case x of {}
do { do {
-- Bring the extra deriving stuff into scope -- Bring the extra deriving stuff into scope
-- before renaming the instances themselves -- before renaming the instances themselves
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment