[commit: ghc] master: Fix bitrotted GHC API test T6145. (cd14075)
git at git.haskell.org
git at git.haskell.org
Fri May 30 01:36:53 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/cd14075fe62a730f2438391f0448edbd1bcf15a2/ghc
>---------------------------------------------------------------
commit cd14075fe62a730f2438391f0448edbd1bcf15a2
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date: Thu May 29 17:20:50 2014 -0700
Fix bitrotted GHC API test T6145.
Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>
>---------------------------------------------------------------
cd14075fe62a730f2438391f0448edbd1bcf15a2
testsuite/tests/ghc-api/.gitignore | 1 +
testsuite/tests/ghc-api/T6145.hs | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/testsuite/tests/ghc-api/.gitignore b/testsuite/tests/ghc-api/.gitignore
index 08e22eb..f52a1f9 100644
--- a/testsuite/tests/ghc-api/.gitignore
+++ b/testsuite/tests/ghc-api/.gitignore
@@ -1,2 +1,3 @@
T8628
T8639_api
+T6145
diff --git a/testsuite/tests/ghc-api/T6145.hs b/testsuite/tests/ghc-api/T6145.hs
index 98e8bd0..13b80ee 100644
--- a/testsuite/tests/ghc-api/T6145.hs
+++ b/testsuite/tests/ghc-api/T6145.hs
@@ -27,15 +27,15 @@ main = do
l <- loadModule d
let ts=typecheckedSource l
-- liftIO (putStr (showSDocDebug (ppr ts)))
- let fs=filterBag (isDataCon . snd) ts
+ let fs=filterBag isDataCon ts
return $ not $ isEmptyBag fs
removeFile "Test.hs"
print ok
where
isDataCon (L _ (AbsBinds { abs_binds = bs }))
- = not (isEmptyBag (filterBag (isDataCon . snd) bs))
+ = not (isEmptyBag (filterBag isDataCon bs))
isDataCon (L l (f at FunBind {}))
- | (MG (m:_) _ _) <- fun_matches f,
+ | (MG (m:_) _ _ _) <- fun_matches f,
(L _ (c at ConPatOut{}):_)<-hsLMatchPats m,
(L l _)<-pat_con c
= isGoodSrcSpan l -- Check that the source location is a good one
More information about the ghc-commits
mailing list