Skip to content

Instantly share code, notes, and snippets.

@dalaing
Created August 9, 2013 12:22
Show Gist options
  • Save dalaing/6193200 to your computer and use it in GitHub Desktop.
Save dalaing/6193200 to your computer and use it in GitHub Desktop.
diff --git a/compiler/typecheck/TcGenDeriv.lhs b/compiler/typecheck/TcGenDeriv.lhs
index 77bda82..1347f14 100644
--- a/compiler/typecheck/TcGenDeriv.lhs
+++ b/compiler/typecheck/TcGenDeriv.lhs
@@ -171,7 +171,7 @@ gen_Eq_binds loc tycon
fall_through_eqn
| no_tag_match_cons -- All constructors have arguments
= case pat_match_cons of
- [] -> [] -- No constructors; no fall-though case
+ [] -> [([], undefined_Expr)] -- No constructors; no fall-though case
[_] -> [] -- One constructor; no fall-though case
_ -> -- Two or more constructors; add fall-through of
-- (==) _ _ = False
@@ -2144,7 +2144,7 @@ bs_RDRs = [ mkVarUnqual (mkFastString ("b"++show i)) | i <- [(1::Int) ..
cs_RDRs = [ mkVarUnqual (mkFastString ("c"++show i)) | i <- [(1::Int) .. ] ]
a_Expr, c_Expr, f_Expr, z_Expr, ltTag_Expr, eqTag_Expr, gtTag_Expr,
- false_Expr, true_Expr, fmap_Expr, pure_Expr, mempty_Expr, foldMap_Expr, traverse_Expr :: LHsExpr RdrName
+ false_Expr, undefined_Expr, true_Expr, fmap_Expr, pure_Expr, mempty_Expr, foldMap_Expr, traverse_Expr :: LHsExpr RdrName
a_Expr = nlHsVar a_RDR
-- b_Expr = nlHsVar b_RDR
c_Expr = nlHsVar c_RDR
@@ -2154,6 +2154,7 @@ ltTag_Expr = nlHsVar ltTag_RDR
eqTag_Expr = nlHsVar eqTag_RDR
gtTag_Expr = nlHsVar gtTag_RDR
false_Expr = nlHsVar false_RDR
+undefined_Expr = nlHsVar undefined_RDR
true_Expr = nlHsVar true_RDR
fmap_Expr = nlHsVar fmap_RDR
pure_Expr = nlHsVar pure_RDR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment