Commit c119a802 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo

Use fmap instead of <$> (Fixes #10407)

The <$> operator is only available in the standard Prelude in
ghc 7.10 and later.
Signed-off-by: Erik de Castro Lopo's avatarErik 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
parent ef7ed16c
......@@ -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
......
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