From 558c7d554b9724abfaa2bcc1f42050e67b36a988 Mon Sep 17 00:00:00 2001 From: Hugo Date: Tue, 22 Feb 2022 16:09:24 +0100 Subject: docs: fix error in annotation guide code snippet --- docs/users_guide/extending_ghc.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/users_guide/extending_ghc.rst') diff --git a/docs/users_guide/extending_ghc.rst b/docs/users_guide/extending_ghc.rst index 06f3d2bb41..a727d3ee60 100644 --- a/docs/users_guide/extending_ghc.rst +++ b/docs/users_guide/extending_ghc.rst @@ -522,8 +522,8 @@ will print out the name of any top-level non-recursive binding with the annotationsOn :: Data a => ModGuts -> CoreBndr -> CoreM [a] annotationsOn guts bndr = do - anns <- getAnnotations deserializeWithData guts - return $ lookupWithDefaultUFM anns [] (varUnique bndr) + (_, anns) <- getAnnotations deserializeWithData guts + return $ lookupWithDefaultUFM_Directly anns [] (varUnique bndr) Please see the GHC API documentation for more about how to use internal APIs, etc. -- cgit v1.2.1