diff options
Diffstat (limited to 'testsuite/tests/ghc-api')
-rw-r--r-- | testsuite/tests/ghc-api/T6145.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/testsuite/tests/ghc-api/T6145.hs b/testsuite/tests/ghc-api/T6145.hs index 0332b05a51..98e8bd0219 100644 --- a/testsuite/tests/ghc-api/T6145.hs +++ b/testsuite/tests/ghc-api/T6145.hs @@ -27,17 +27,17 @@ main = do l <- loadModule d let ts=typecheckedSource l -- liftIO (putStr (showSDocDebug (ppr ts))) - let fs=filterBag getDataCon ts + let fs=filterBag (isDataCon . snd) ts return $ not $ isEmptyBag fs removeFile "Test.hs" print ok where - getDataCon (L _ (AbsBinds { abs_binds = bs })) - = not (isEmptyBag (filterBag getDataCon bs)) - getDataCon (L l (f@FunBind {})) + isDataCon (L _ (AbsBinds { abs_binds = bs })) + = not (isEmptyBag (filterBag (isDataCon . snd) bs)) + isDataCon (L l (f@FunBind {})) | (MG (m:_) _ _) <- fun_matches f, (L _ (c@ConPatOut{}):_)<-hsLMatchPats m, (L l _)<-pat_con c = isGoodSrcSpan l -- Check that the source location is a good one - getDataCon _ + isDataCon _ = False |