fix haddock submodule pointer
[ghc-hetmet.git] / compiler / typecheck / TcHsSyn.lhs
index 2a17fe8..5ce40fc 100644 (file)
@@ -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 (FL { fl_text = show i, fl_value = 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
@@ -129,8 +129,8 @@ shortCutLit (HsIntegral i) ty
        -- literals, compiled without -O
 
 shortCutLit (HsFractional f) ty
-  | isFloatTy ty  = Just (mkLit floatDataCon  (HsFloatPrim (fl_value f)))
-  | isDoubleTy ty = Just (mkLit doubleDataCon (HsDoublePrim (fl_value f)))
+  | isFloatTy ty  = Just (mkLit floatDataCon  (HsFloatPrim f))
+  | isDoubleTy ty = Just (mkLit doubleDataCon (HsDoublePrim f))
   | otherwise     = Nothing
 
 shortCutLit (HsIsString s) ty
@@ -546,6 +546,33 @@ zonkExpr env (HsPar e)
   = zonkLExpr env e    `thenM` \new_e ->
     returnM (HsPar new_e)
 
+zonkExpr env (HsHetMetBrak c e)    
+  = do c' <- zonkTcTypeToType env c
+       e' <- zonkLExpr env e
+       return (HsHetMetBrak c' e')
+
+zonkExpr env (HsHetMetEsc c t e)    
+  = do c' <- zonkTcTypeToType env c
+       t' <- zonkTcTypeToType env t
+       e' <- zonkLExpr env e
+       return (HsHetMetEsc c' t' e')
+
+zonkExpr env (HsHetMetCSP c e)    
+  = do c' <- zonkTcTypeToType env c
+       e' <- zonkLExpr env e
+       return (HsHetMetCSP c' e')
+
+zonkExpr env (HsKappa matches)
+  = do { matches' <- zonkMatchGroup env matches
+       ; returnM (HsKappa matches')
+       }
+
+zonkExpr env (HsKappaApp e1 e2)
+  = do { e1' <- zonkLExpr env e1
+       ; e2' <- zonkLExpr env e2
+       ; returnM (HsKappaApp e1' e2')
+       }
+
 zonkExpr env (SectionL expr op)
   = zonkLExpr env expr `thenM` \ new_expr ->
     zonkLExpr env op           `thenM` \ new_op ->
@@ -1027,6 +1054,10 @@ zonkVect env (HsVect v (Just e))
        ; e' <- zonkLExpr env e
        ; return $ HsVect v' (Just e')
        }
+zonkVect env (HsNoVect v)
+  = do { v' <- wrapLocM (zonkIdBndr env) v
+       ; return $ HsNoVect v'
+       }
 \end{code}
 
 %************************************************************************