
#11329: Visible type applications: failing tests with WAY=hpc -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: | TypeApplications Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | parser/should_compile/VtaParse | typecheck/should_compile/Vta1 | typecheck/should_compile/Vta2 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rwbarton): So in an expression like `print @Double 3` the type argument is getting a tick, so that the ticked expression looks like `tick print (tick @Double) (tick 3)`. Then `dsExpr`'s `HsApp` case no longer recognizes the construction `tick print (tick @Double)` as a type application, due to the second `tick`, and later tries and fails to desugar the argument `@Double`. One solution would be to look through ticks in `isLHsTypeExpr`, so that `dsExpr`'s `HsApp` case would still recognize a type application even if there are ticks in it. That would be simple and the type argument is then thrown away at that point anyways. But maybe it's better not to introduce a tick around a type argument in the first place, since that makes no sense. `Coverage.addTickHsExpr` has a case {{{ addTickHsExpr e@(HsTypeOut _) = return e }}} but it doesn't work as intended because `addTickHsExpr` only controls what ticks are added to the body of an expression. Whether to add a tick around the whole expression is controlled by `addTickLHsExpr` and a number of similar functions. I'm building a fix that recognizes type applications in `addTickHsExpr` and will post it on Phab when ready. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11329#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler