X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fstranal%2FWwLib.lhs;h=229c2ece3b2709053ecaeebc7ac0e5e0e849378d;hb=bbc583766a08678d03740354bed216e268306356;hp=4254d35de8aab0f637148cc6bd2d68701791c905;hpb=30c122df62ec75f9ed7f392f24c2925675bf1d06;p=ghc-hetmet.git diff --git a/compiler/stranal/WwLib.lhs b/compiler/stranal/WwLib.lhs index 4254d35..229c2ec 100644 --- a/compiler/stranal/WwLib.lhs +++ b/compiler/stranal/WwLib.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 % -\section[WwLib]{A library for the ``worker/wrapper'' back-end to the strictness analyser} +\section[WwLib]{A library for the ``worker\/wrapper'' back-end to the strictness analyser} \begin{code} module WwLib ( mkWwBodies, mkWWstr, mkWorkerArgs ) where @@ -44,7 +44,7 @@ Here's an example. The original function is: \begin{verbatim} g :: forall a . Int -> [a] -> a -g = /\ a -> \ x ys -> +g = \/\ a -> \ x ys -> case x of 0 -> head ys _ -> head (tail ys) @@ -55,7 +55,7 @@ From this, we want to produce: -- wrapper (an unfolding) g :: forall a . Int -> [a] -> a -g = /\ a -> \ x ys -> +g = \/\ a -> \ x ys -> case x of I# x# -> $wg a x# ys -- call the worker; don't forget the type args! @@ -63,7 +63,7 @@ g = /\ a -> \ x ys -> -- worker $wg :: forall a . Int# -> [a] -> a -$wg = /\ a -> \ x# ys -> +$wg = \/\ a -> \ x# ys -> let x = I# x# in @@ -98,7 +98,7 @@ the unusable strictness-info into the interfaces. %* * %************************************************************************ -@mkWwBodies@ is called when doing the worker/wrapper split inside a module. +@mkWwBodies@ is called when doing the worker\/wrapper split inside a module. \begin{code} mkWwBodies :: Type -- Type of original function @@ -278,7 +278,7 @@ applyToVars vars fn = mkVarApps fn vars mk_wrap_arg :: Unique -> Type -> NewDemand.Demand -> Bool -> Id mk_wrap_arg uniq ty dmd one_shot - = set_one_shot one_shot (setIdNewDemandInfo (mkSysLocal FSLIT("w") uniq ty) dmd) + = set_one_shot one_shot (setIdNewDemandInfo (mkSysLocal (fsLit "w") uniq ty) dmd) where set_one_shot True id = setOneShotLambda id set_one_shot False id = id @@ -502,5 +502,5 @@ sanitiseCaseBndr :: Id -> Id sanitiseCaseBndr id = id `setIdInfo` vanillaIdInfo mk_ww_local :: Unique -> Type -> Id -mk_ww_local uniq ty = mkSysLocal FSLIT("ww") uniq ty +mk_ww_local uniq ty = mkSysLocal (fsLit "ww") uniq ty \end{code}