summaryrefslogtreecommitdiff
path: root/ghc/compiler/typecheck/TcMonad.lhs
diff options
context:
space:
mode:
Diffstat (limited to 'ghc/compiler/typecheck/TcMonad.lhs')
-rw-r--r--ghc/compiler/typecheck/TcMonad.lhs7
1 files changed, 1 insertions, 6 deletions
diff --git a/ghc/compiler/typecheck/TcMonad.lhs b/ghc/compiler/typecheck/TcMonad.lhs
index 41f0890182..588f87168b 100644
--- a/ghc/compiler/typecheck/TcMonad.lhs
+++ b/ghc/compiler/typecheck/TcMonad.lhs
@@ -642,12 +642,7 @@ type TcError = Message
type TcWarning = Message
ctxt_to_use ctxt | opt_PprStyle_Debug = ctxt
- | otherwise = takeAtMost 3 ctxt
- where
- takeAtMost :: Int -> [a] -> [a]
- takeAtMost 0 ls = []
- takeAtMost n [] = []
- takeAtMost n (x:xs) = x:takeAtMost (n-1) xs
+ | otherwise = take 3 ctxt
arityErr kind name n m
= hsep [ text kind, quotes (ppr name), ptext SLIT("should have"),