
#11027: GHC API panic (evaluated the place holder for a PostTcType) -------------------------------------+------------------------------------- Reporter: rubik | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHC API | Version: 7.8.4 Resolution: | Keywords: undefined, | place holder, posttctype Operating System: Linux | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): I think the problem is the generic traversal on line 27. {{{ getBinds :: (Data from, Typeable from) => from -> [Function] getBinds = everything (++) $ mkQ [] visit where visit fun@(GHC.FunBind {}) = [fun] visit _ = [] }}} It is not safe to do generic traversals on the GHC 7.8 AST due to the reason you encountered! There are landmines. You can use ghc-syb-utils if you want to also support 7.8. In future, triggering panics when using the API isn't usually a bug in GHC. Alan and I will be happy to help you on #haskell-refactorer if you have any more questions. https://hackage.haskell.org/package/ghc-syb-utils-0.2.3/docs/GHC-SYB- Utils.html -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11027#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler