Commit cd14075f authored by Edward Z. Yang's avatar Edward Z. Yang

Fix bitrotted GHC API test T6145.

Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent 6c5017a8
......@@ -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@FunBind {}))
| (MG (m:_) _ _) <- fun_matches f,
| (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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment