X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FdeSugar%2FCheck.lhs;h=2402f9839bd909feea3e45a6148573279e9f34b0;hp=fa85a1dcb7ccada70e26c7594eb0b25b4af75a0a;hb=3391a03562d4056de7b16cd0f632e6c43ae44cca;hpb=7028041739973c3dc17b23a98c65c892f41f0647 diff --git a/compiler/deSugar/Check.lhs b/compiler/deSugar/Check.lhs index fa85a1d..2402f98 100644 --- a/compiler/deSugar/Check.lhs +++ b/compiler/deSugar/Check.lhs @@ -27,10 +27,10 @@ import TysWiredIn import PrelNames import TyCon import Type -import Unify( dataConCannotMatch ) import SrcLoc import UniqSet import Util +import BasicTypes import Outputable import FastString \end{code} @@ -110,8 +110,7 @@ type EqnSet = UniqSet EqnNo check :: [EquationInfo] -> ([ExhaustivePat], [EquationInfo]) -- Second result is the shadowed equations -- if there are view patterns, just give up - don't know what the function is -check qs = pprTrace "check" (ppr tidy_qs) $ - (untidy_warns, shadowed_eqns) +check qs = (untidy_warns, shadowed_eqns) where tidy_qs = map tidy_eqn qs (warns, used_nos) = check' ([1..] `zip` tidy_qs) @@ -439,7 +438,7 @@ get_lit :: Pat id -> Maybe HsLit -- with other HsLits gotten in the same way get_lit (LitPat lit) = Just lit get_lit (NPat (OverLit { ol_val = HsIntegral i}) mb _) = Just (HsIntPrim (mb_neg mb i)) -get_lit (NPat (OverLit { ol_val = HsFractional f }) mb _) = Just (HsFloatPrim (mb_neg mb f)) +get_lit (NPat (OverLit { ol_val = HsFractional f }) mb _) = Just (HsFloatPrim (mb_neg mb (fl_value f))) get_lit (NPat (OverLit { ol_val = HsIsString s }) _ _) = Just (HsStringPrim s) get_lit _ = Nothing