[GHC] #15932: DeriveFunctor and GeneralizedNewtypeDeriving instances never reporting as covered

#15932: DeriveFunctor and GeneralizedNewtypeDeriving instances never reporting as covered -------------------------------------+------------------------------------- Reporter: davean | Owner: (none) Type: bug | Status: new Priority: low | Milestone: 8.6.3 Component: Code Coverage | Version: 8.6.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Other Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- When testing coverage of test cases, HPC does not report some instances as receiving coverage even though it seems they are. Particularly, when one hand derives the functions they show full coverage. The specific instances in question appear to be ones derived via DeriveFunctor and GeneralizedNewtypeDeriving. Problems have been observed with at least Functor, Applicative, and Monad. A minimal example is attached, and available as a cabal project at https://code.xkrd.net/davean/minimal-coverage-test. To reproduce, run "cabal v2-test --enable-coverage" and view the resulting coverage HTML files. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15932 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15932: DeriveFunctor and GeneralizedNewtypeDeriving instances never reporting as covered -------------------------------------+------------------------------------- Reporter: davean | Owner: (none) Type: bug | Status: new Priority: low | Milestone: 8.6.3 Component: Code Coverage | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by davean): * Attachment "Cov.hs" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15932 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15932: DeriveFunctor and GeneralizedNewtypeDeriving instances never reporting as covered -------------------------------------+------------------------------------- Reporter: davean | Owner: (none) Type: bug | Status: new Priority: low | Milestone: 8.6.3 Component: Code Coverage | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by davean): * Attachment "test.hs" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15932 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15932: DeriveFunctor and GeneralizedNewtypeDeriving instances never reporting as covered -------------------------------------+------------------------------------- Reporter: davean | Owner: (none) Type: bug | Status: new Priority: low | Milestone: 8.6.3 Component: Code Coverage | Version: 8.6.2 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * keywords: => newcomer Comment: I suspect this wouldn't be too hard to fix. The relevant implementation bits can be found in `deSugar/Coverage.hs`; I would start by looking at the `-ddump-ds` output to verify that there are no coverage ticks in the derived instances. If this really is the issue then I suspect a solution should be straightforward. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15932#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC