%
% (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
\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)
-- 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!
-- worker
$wg :: forall a . Int# -> [a] -> a
-$wg = /\ a -> \ x# ys ->
+$wg = \/\ a -> \ x# ys ->
let
x = I# x#
in
%* *
%************************************************************************
-@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
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
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}