Add 123## literals for Word#
[ghc-hetmet.git] / compiler / typecheck / TcHsSyn.lhs
index 7afd9e8..160170f 100644 (file)
@@ -118,6 +118,7 @@ hsLitType (HsString str)   = stringTy
 hsLitType (HsStringPrim s) = addrPrimTy
 hsLitType (HsInt i)       = intTy
 hsLitType (HsIntPrim i)    = intPrimTy
+hsLitType (HsWordPrim w)   = wordPrimTy
 hsLitType (HsInteger i ty) = ty
 hsLitType (HsRat _ ty)    = ty
 hsLitType (HsFloatPrim f)  = floatPrimTy
@@ -563,8 +564,8 @@ zonkCoFn env WpInline = return (env, WpInline)
 zonkCoFn env (WpCompose c1 c2) = do { (env1, c1') <- zonkCoFn env c1
                                    ; (env2, c2') <- zonkCoFn env1 c2
                                    ; return (env2, WpCompose c1' c2') }
-zonkCoFn env (WpCo co)      = do { co' <- zonkTcTypeToType env co
-                                ; return (env, WpCo co') }
+zonkCoFn env (WpCast co)    = do { co' <- zonkTcTypeToType env co
+                                ; return (env, WpCast co') }
 zonkCoFn env (WpLam id)     = do { id' <- zonkDictBndr env id
                                 ; let env1 = extendZonkEnv1 env id'
                                 ; return (env1, WpLam id') }
@@ -1023,10 +1024,10 @@ mkArbitraryType warn tv
     (args,res) = splitKindFunTys kind
     tup_tc     = tupleTyCon Boxed (length args)
                
-    msg = vcat [ hang (ptext SLIT("Inventing strangely-kinded Any TyCon"))
-                   2 (ptext SLIT("of kind") <+> quotes (ppr kind))
-              , nest 2 (ptext SLIT("from an instantiation of type variable") <+> quotes (ppr tv))
-              , ptext SLIT("This warning can be suppressed by a type signature fixing") <+> quotes (ppr tv)
-              , nest 2 (ptext SLIT("but is harmless without -O (and usually harmless anyway)."))
-              , ptext SLIT("See http://hackage.haskell.org/trac/ghc/ticket/959 for details")  ]
+    msg = vcat [ hang (ptext (sLit "Inventing strangely-kinded Any TyCon"))
+                   2 (ptext (sLit "of kind") <+> quotes (ppr kind))
+              , nest 2 (ptext (sLit "from an instantiation of type variable") <+> quotes (ppr tv))
+              , ptext (sLit "This warning can be suppressed by a type signature fixing") <+> quotes (ppr tv)
+              , nest 2 (ptext (sLit "but is harmless without -O (and usually harmless anyway)."))
+              , ptext (sLit "See http://hackage.haskell.org/trac/ghc/ticket/959 for details")  ]
 \end{code}