[GHC] #15498: HPC: do notation marks () as non-covered
GHC
ghc-devs at haskell.org
Thu Aug 9 21:10:44 UTC 2018
#15498: HPC: do notation marks () as non-covered
-------------------------------------+-------------------------------------
Reporter: tom-bop | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Code Coverage | Version: 8.2.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Incorrect
Unknown/Multiple | error/warning at compile-time
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
With this Main.hs, the "()" in "pure ()" is marked by HPC as a non-covered
expression:
{{{#!hs
foo :: IO ()
foo = do
_ <- putStrLn "Unimportant string"
pure ()
main :: IO ()
main = do
foo
putStrLn "Unimportant #2"
}}}
Repro:
- `ghc -fhpc Main.hs`
- `./Main`
- `hpc markup Main.tix`
This is an admittedly small issue, but it can be valuable for a project to
aspire to 100% code coverage and false negatives prevent us from getting
there.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15498>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list