Commit e4fa0854 authored by Simon Marlow's avatar Simon Marlow

FIX BUILD with GHC 6.4.x

parent 21c9699e
......@@ -672,7 +672,7 @@ specExpr subst (Case scrut case_bndr ty alts) = do
spec_alt (con, args, rhs) = do
(rhs', uds) <- specExpr subst_rhs rhs
let (uds', rhs'') = do dumpUDs args uds rhs'
let (uds', rhs'') = dumpUDs args uds rhs'
return ((con, args', rhs''), uds')
where
(subst_rhs, args') = substBndrs subst_alt args
......@@ -1220,7 +1220,7 @@ cloneBindSM :: Subst -> CoreBind -> SpecM (Subst, Subst, CoreBind)
-- Return the substitution to use for RHSs, and the one to use for the body
cloneBindSM subst (NonRec bndr rhs) = do
us <- getUniqueSupplyM
let (subst', bndr') = do cloneIdBndr subst us bndr
let (subst', bndr') = cloneIdBndr subst us bndr
return (subst, subst', NonRec bndr' rhs)
cloneBindSM subst (Rec pairs) = do
......
......@@ -122,7 +122,7 @@ mkWwBodies :: Type -- Type of original function
mkWwBodies fun_ty demands res_info one_shots = do
(wrap_args, wrap_fn_args, work_fn_args, res_ty) <- mkWWargs fun_ty demands one_shots'
(work_args, wrap_fn_str, work_fn_str) <- mkWWstr wrap_args
let (work_lam_args, work_call_args) = do mkWorkerArgs work_args res_ty
let (work_lam_args, work_call_args) = mkWorkerArgs work_args res_ty
-- Don't do CPR if the worker doesn't have any value arguments
-- Then the worker is just a constant, so we don't want to unbox it.
(wrap_fn_cpr, work_fn_cpr, _cpr_res_ty)
......
......@@ -21,7 +21,11 @@ module MonadUtils
-- Detection of available libraries
----------------------------------------------------------------------------------------
#if __GLASGOW_HASKELL__ >= 606
#define HAVE_APPLICATIVE 1
#else
#define HAVE_APPLICATIVE 0
#endif
-- we don't depend on MTL for now
#define HAVE_MTL 0
......@@ -54,6 +58,10 @@ class Functor f => Applicative f where
infixl 4 <$>
infixl 4 <*>
instance Applicative IO where
pure = return
(<*>) = ap
#endif
----------------------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment