Use fmap instead of <$> (Fixes #10407)
authorErik de Castro Lopo <erikd@mega-nerd.com>
Tue, 12 May 2015 04:52:16 +0000 (14:52 +1000)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Tue, 12 May 2015 05:24:24 +0000 (15:24 +1000)
The <$> operator is only available in the standard Prelude in
ghc 7.10 and later.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Test Plan: build with ghc-7.6

Reviewers: dterei, ezyang, austin

Subscribers: bgamari, thomie

Differential Revision: https://phabricator.haskell.org/D886

GHC Trac Issues: #10407

compiler/typecheck/TcInteract.hs

index 33ff043..95715fe 100644 (file)
@@ -610,7 +610,7 @@ selectNextWorkItem
           (Nothing,_)
               -> (NoWorkRemaining,wl)           -- No more work
           (Just ct, new_wl)
-              | subGoalDepthExceeded dflags (ctLocDepth (ctLoc ct)) 
+              | subGoalDepthExceeded dflags (ctLocDepth (ctLoc ct))
               -> (MaxDepthExceeded ct,new_wl)   -- Depth exceeded
 
               | otherwise
@@ -2030,8 +2030,8 @@ matchClassInst inerts clas tys loc
         ; traceTcS "matchClassInst" $ vcat [ text "pred =" <+> ppr pred
                                            , text "inerts=" <+> ppr inerts ]
         ; instEnvs <- getInstEnvs
-        ; safeOverlapCheck <- (`elem` [Sf_Safe, Sf_Trustworthy])
-            <$> safeHaskell <$> getDynFlags
+        ; safeOverlapCheck <- ((`elem` [Sf_Safe, Sf_Trustworthy]) . safeHaskell)
+                            `fmap` getDynFlags
         ; let (matches, unify, unsafeOverlaps) = lookupInstEnv True instEnvs clas tys
               safeHaskFail = safeOverlapCheck && not (null unsafeOverlaps)
         ; case (matches, unify, safeHaskFail) of