summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2015-05-12 14:52:16 +1000
committerErik de Castro Lopo <erikd@mega-nerd.com>2015-05-12 15:24:24 +1000
commitc119a8020f4e3073460e2c350507d5cf65771cea (patch)
tree7b3b1f47190be2d5c23b260697255f2248860e6c
parentef7ed16c8a34e5ab26a23264f02aa6391c338884 (diff)
downloadhaskell-c119a8020f4e3073460e2c350507d5cf65771cea.tar.gz
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 <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
-rw-r--r--compiler/typecheck/TcInteract.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/typecheck/TcInteract.hs b/compiler/typecheck/TcInteract.hs
index 33ff043a64..95715fe03d 100644
--- a/compiler/typecheck/TcInteract.hs
+++ b/compiler/typecheck/TcInteract.hs
@@ -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