diff options
Diffstat (limited to 'testsuite/tests/ghc-api/annotations/annotations.hs')
-rw-r--r-- | testsuite/tests/ghc-api/annotations/annotations.hs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/testsuite/tests/ghc-api/annotations/annotations.hs b/testsuite/tests/ghc-api/annotations/annotations.hs index 9ea0c0c004..a9d54a422b 100644 --- a/testsuite/tests/ghc-api/annotations/annotations.hs +++ b/testsuite/tests/ghc-api/annotations/annotations.hs @@ -43,13 +43,16 @@ testOneFile libdir fileName = do return (pm_annotations p) let anns = p - (l,_) = fst $ head $ Map.toList (fst anns) - annModule = (getAnnotation anns l AnnModule) - annLet = (getAnnotation anns l AnnLet) + ann_items = apiAnnItems anns + ann_eof = apiAnnEofPos anns + (l,_) = fst $ head $ Map.toList ann_items + annModule = getAnnotation anns l AnnModule + annLet = getAnnotation anns l AnnLet - putStrLn (intercalate "\n" [showAnns anns,pp annModule,pp annLet,pp l]) + putStrLn (intercalate "\n" [showAnns ann_items,pp annModule,pp annLet,pp l, + "EOF: " ++ show ann_eof]) -showAnns (anns,_) = "[\n" ++ (intercalate "\n" +showAnns anns = "[\n" ++ (intercalate "\n" $ map (\((s,k),v) -> ("(AK " ++ pp s ++ " " ++ show k ++" = " ++ pp v ++ ")\n")) $ Map.toList anns) |