floatToWord :: CAddrMode -> CAddrMode
floatToWord (CLit (MachFloat r))
= runST (do
- arr <- newFloatArray (0,0)
+ arr <- newFloatArray ((0::Int),0)
writeFloatArray arr 0 (fromRational r)
i <- readIntArray arr 0
return (CLit (MachInt (toInteger i) True))
doubleToWords (CLit (MachDouble r))
| big_doubles -- doubles are 2 words
= runST (do
- arr <- newDoubleArray (0,1)
+ arr <- newDoubleArray ((0::Int),1)
writeDoubleArray arr 0 (fromRational r)
i1 <- readIntArray arr 0
i2 <- readIntArray arr 1
)
| otherwise -- doubles are 1 word
= runST (do
- arr <- newDoubleArray (0,0)
+ arr <- newDoubleArray ((0::Int),0)
writeDoubleArray arr 0 (fromRational r)
i <- readIntArray arr 0
return [ CLit (MachInt (toInteger i) True) ]
pp_mod_dot sty
= case prov of
- SystemProv -> pp_qual mod dot user_sty
- -- Hack alert! Omit the qualifier on SystemProv things, which I claim
- -- will also be WiredIn things. We can't get the omit flag right
+ SystemProv -> pp_qual mod pp_sep user_sty
+ -- Hack alert! Omit the qualifier on SystemProv things in user style
+ -- I claim such SystemProv things will also be WiredIn things.
+ -- We can't get the omit flag right
-- on wired in tycons etc (sigh) so we just leave it out in user style,
-- and hope that leaving it out isn't too consfusing.
-- (e.g. if the programmer hides Bool and redefines it. If so, use -dppr-debug.)
maybe_tuple ('(' : cs) = check_tuple 0 cs
maybe_tuple other = Nothing
+check_tuple :: Int -> String -> Maybe Int
check_tuple n (',' : cs) = check_tuple (n+1) cs
check_tuple n ")" = Just n
check_tuple n other = Nothing
, head args : addrTy : tail args)
| otherwise = (mkCArgNames 0 args, args)
- mkCArgNames n as = zipWith (\ _ n -> text ('a':show n)) as [n..]
+mkCArgNames :: Int -> [a] -> [SDoc]
+mkCArgNames n as = zipWith (\ _ n -> text ('a':show n)) as [n..]
mkHObj :: Type -> SDoc
mkHObj t = text "rts_mk" <> showFFIType t
using:
\begin{code}
+interfaceFileFormatVersion :: Int
interfaceFileFormatVersion = HscIfaceFileVersion
\end{code}
(_,_,ss,is) ->
(addpr (count_monobinds inst_meths), ss, is)
+ addpr :: (Int,Int) -> Int
+ add1 :: Int -> Int -> Int
+ add2 :: (Int,Int) -> (Int,Int) -> (Int, Int)
+ add3 :: (Int,Int,Int) -> (Int,Int,Int) -> (Int, Int, Int)
+ add4 :: (Int,Int,Int,Int) -> (Int,Int,Int,Int) -> (Int, Int, Int, Int)
+ add5 :: (Int,Int,Int,Int,Int) -> (Int,Int,Int,Int,Int) -> (Int, Int, Int, Int, Int)
+ add6 :: (Int,Int,Int,Int,Int,Int) -> (Int,Int,Int,Int,Int,Int) -> (Int, Int, Int, Int, Int, Int)
+
addpr (x,y) = x+y
add1 x1 y1 = x1+y1
add2 (x1,x2) (y1,y2) = (x1+y1,x2+y2)
-> ICanSafelyBeINLINEd InsideLam nalts
other -> inline_prag
+ definitely_saturated :: Int -> CoreExpr -> SimplCont -> Bool
definitely_saturated 0 _ _ = False -- Too expensive to find out
definitely_saturated n (Lam _ body) (ApplyTo _ _ _ cont) = definitely_saturated (n-1) body cont
definitely_saturated n (Lam _ _) other_cont = False
findStrictness tys str_val abs_val
= (map find_str tys_w_index, isBot (foldl (absApply StrAnal) str_val all_tops))
where
- tys_w_index = tys `zip` [1..]
+ tys_w_index = tys `zip` [(1::Int) ..]
find_str (ty,n) = findRecDemand str_fn abs_fn ty
where
ptext SLIT("which is mentioned in the environment")
| otherwise = ptext SLIT("It is mentioned in the environment")
+ vcat_first :: Int -> [SDoc] -> SDoc
vcat_first n [] = empty
vcat_first 0 (x:xs) = text "...others omitted..."
vcat_first n (x:xs) = x $$ vcat_first (n-1) xs