[GHC] #13642: GHCi 8.2 simply ignores TH splice using datatype with a forall'd kind signature
GHC
ghc-devs at haskell.org
Thu May 4 02:19:33 UTC 2017
#13642: GHCi 8.2 simply ignores TH splice using datatype with a forall'd kind
signature
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Template Haskell | Version: 8.2.1-rc1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):
* cc: goldfire (added)
Comment:
After some digging, the function responsible for suppressing the error
message appears to be `dsWhenNoErrs`:
{{{#!hs
dsWhenNoErrs :: DsM a -> (a -> CoreExpr) -> DsM CoreExpr
dsWhenNoErrs thing_inside mk_expr
= do { (result, no_errs) <- askNoErrsDs thing_inside
; return $ if no_errs
then mk_expr result
else unitExpr }
}}}
For whatever reason, `askNoErrsDs` does not appear to be propagating the
error message correctly.
There's also similar issues with splicing in any other features which
Template Haskell doesn't support. For example, you could just as well use
`[d| id x = x {-# SCC id #-} |]` in the example above.
goldfire, do you have an idea of what's going on here?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13642#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list