#8265: getTokenStream fails for source using cpp -------------------------------------+------------------------------------- Reporter: alanz | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHC API | Version: 7.6.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: Compile- | Blocked By: time crash | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by thomie): * os: Linux => Unknown/Multiple Comment: To reproduce, use `BCpp.hs` and `tokenbug.2.hs` from above. {{{ $ cabal install ghc-paths $ ghc -package ghc tokenbug.2.hs $ ./tokenbug.2 got saf:("./BCpp.hs",<stringbuffer(199,0)>) got src:[{-# LANGUAGE CPP #-} -- Check that we can parse a file which requires CPP module BCpp where bob :: Int -> Int -> Int #if __GLASGOW_HASKELL__ > 704 bob x y = x + y #else bob x y = x + y * 2 #endif ] got saf:("./BCpp.hs",<stringbuffer(199,0)>) tokenbug.2: panic! (the 'impossible' happened) (GHC version 7.8.3 for x86_64-unknown-linux): parse failed }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8265#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler