FIX validate: Fix warnings in new literal code
authorRoman Leshchinskiy <rl@cse.unsw.edu.au>
Wed, 7 May 2008 03:54:17 +0000 (03:54 +0000)
committerRoman Leshchinskiy <rl@cse.unsw.edu.au>
Wed, 7 May 2008 03:54:17 +0000 (03:54 +0000)
Validate uses -Werror so the warnings broke it.

compiler/deSugar/DsMeta.hs
compiler/deSugar/MatchLit.lhs

index 8bb7133..7d9b717 100644 (file)
@@ -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
index 6d7db7c..a3b59d1 100644 (file)
@@ -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)