X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcHsSyn.lhs;h=12b50acff09067c846c23444ae734d3058815c06;hp=35da6557fcb8b3fab8c61c908ee6f219138b96a4;hb=6ddfe9b18d4d280676aab2fa797ddbe6f8a09d6b;hpb=ca53c38335cdc671f0b1e0949aa1514fc3fd72a5 diff --git a/compiler/typecheck/TcHsSyn.lhs b/compiler/typecheck/TcHsSyn.lhs index 35da655..12b50ac 100644 --- a/compiler/typecheck/TcHsSyn.lhs +++ b/compiler/typecheck/TcHsSyn.lhs @@ -52,7 +52,7 @@ import SrcLoc import Bag import FastString import Outputable -import Data.Traversable( traverse ) +-- import Data.Traversable( traverse ) \end{code} \begin{code} @@ -121,7 +121,7 @@ shortCutLit (HsIntegral i) ty | isIntTy ty && inIntRange i = Just (HsLit (HsInt i)) | isWordTy ty && inWordRange i = Just (mkLit wordDataCon (HsWordPrim i)) | isIntegerTy ty = Just (HsLit (HsInteger i ty)) - | otherwise = shortCutLit (HsFractional (fromInteger i)) ty + | otherwise = shortCutLit (HsFractional (integralFractionalLit i)) ty -- The 'otherwise' case is important -- Consider (3 :: Float). Syntactically it looks like an IntLit, -- so we'll call shortCutIntLit, but of course it's a float @@ -1129,7 +1129,6 @@ zonkTcCoToCo env co go (AxiomInstCo ax cos) = do { cos' <- mapM go cos; return (AxiomInstCo ax cos') } go (AppCo co1 co2) = do { co1' <- go co1; co2' <- go co2 ; return (mkAppCo co1' co2') } - go (PredCo pco) = do { pco' <- go `traverse` pco; return (mkPredCo pco') } go (UnsafeCo t1 t2) = do { t1' <- zonkTcTypeToType env t1 ; t2' <- zonkTcTypeToType env t2 ; return (mkUnsafeCo t1' t2') }