
#15321: Typed holes in Template Haskell splices produce bewildering error messages -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Template Haskell | Version: 8.4.3 Resolution: | Keywords: TypedHoles Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mgsloan): I'm trying to get more familiar with working on GHC / TH, so took a look at the trac issues. This one seemed interesting to resolve, so I took a look. Just writing a note here so that y'all know there is work in progress here. I think I've figured it out! Indeed, when searching for valid hole fits, it is considering names that come from the current module, even when in a TH splice. My plan is to check `tcl_th_ctxt` to see if we're in a splice, and in that case omit `lcl` (module locals) from the computation of `locals` in `findValidHoleFits`. `lclBinds` will still be used, since locals within the splice certainly should be checked for fitting. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15321#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler