diff options
Diffstat (limited to 'testsuite/tests/ghc-api/T6145.hs')
-rw-r--r-- | testsuite/tests/ghc-api/T6145.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/testsuite/tests/ghc-api/T6145.hs b/testsuite/tests/ghc-api/T6145.hs index 58a4f9b7d5..fc0a71ade3 100644 --- a/testsuite/tests/ghc-api/T6145.hs +++ b/testsuite/tests/ghc-api/T6145.hs @@ -31,9 +31,11 @@ main = do return $ not $ isEmptyBag fs removeFile "Test.hs" print ok - where + where isDataCon (L _ (AbsBinds { abs_binds = bs })) = not (isEmptyBag (filterBag isDataCon bs)) + isDataCon (L _ (AbsBindsSig { abs_sig_bind = b })) + = isDataCon b isDataCon (L l (f@FunBind {})) | (MG (L _ (m:_)) _ _ _) <- fun_matches f, (L _ (c@ConPatOut{}):_)<-hsLMatchPats m, |