From c97c0ab354da338854574f9c1fb89f7db061d4ae Mon Sep 17 00:00:00 2001 From: Roman Leshchinskiy Date: Wed, 7 May 2008 03:54:17 +0000 Subject: [PATCH] FIX validate: Fix warnings in new literal code Validate uses -Werror so the warnings broke it. --- compiler/deSugar/DsMeta.hs | 1 + compiler/deSugar/MatchLit.lhs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/deSugar/DsMeta.hs b/compiler/deSugar/DsMeta.hs index 8bb7133..7d9b717 100644 --- a/compiler/deSugar/DsMeta.hs +++ b/compiler/deSugar/DsMeta.hs @@ -1303,6 +1303,7 @@ repOverloadedLiteral (OverLit { ol_val = val}) -- the smart constructor 'TH.Syntax.rationalL' uses it in its type, -- and rationalL is sucked in when any TH stuff is used +mk_lit :: OverLitVal -> DsM HsLit mk_lit (HsIntegral i) = mk_integer i mk_lit (HsFractional f) = mk_rational f mk_lit (HsIsString s) = mk_string s diff --git a/compiler/deSugar/MatchLit.lhs b/compiler/deSugar/MatchLit.lhs index 6d7db7c..a3b59d1 100644 --- a/compiler/deSugar/MatchLit.lhs +++ b/compiler/deSugar/MatchLit.lhs @@ -154,7 +154,7 @@ tidyLitPat lit = LitPat lit ---------------- tidyNPat :: HsOverLit Id -> Maybe (SyntaxExpr Id) -> SyntaxExpr Id -> Pat Id -tidyNPat over_lit@(OverLit val False _ ty) mb_neg eq +tidyNPat (OverLit val False _ ty) mb_neg _ -- Take short cuts only if the literal is not using rebindable syntax | isIntTy ty = mk_con_pat intDataCon (HsIntPrim int_val) | isWordTy ty = mk_con_pat wordDataCon (HsWordPrim int_val) -- 1.7.10.4