[GHC] #13169: Documentation for CoreMonad.getAnnotations

#13169: Documentation for CoreMonad.getAnnotations -------------------------------------+------------------------------------- Reporter: abakst | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Documentation | Version: 7.10.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- The documentation for `getAnnotations` in `CoreMonad` is a bit unclear. In particular, the documentation could be improved by indicating that the returned `UniqFM` is keyed off of the `Unique` corresponding to an `AnnTarget`: That is, to look up the annotations on `x`, it seems one should call `getAnnotations` on either `ModuleTarget x` or `NamedTarget x` (if my understanding of how this all works is correct, that is). I stumbled across this by trying to look up the annotations on module `m` using the key `getUnique m`. This was incorrect as the annotation is stored on a unique *derived* from `getUnique m` (which wasn't indicated in the documentation). Thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13169 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC