#4836: literate markdown not handled correctly by unlit
---------------------------------+------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.0.1 | Keywords:
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: GHC rejects valid program
---------------------------------+------------------------------------------
Comment(by duncan):
So the problem here is that ghc does `unlit` before `cpp` and so it has to
pass the #cpp directives through. It has to do `unlit` before `cpp`
because in the worst case the only time ghc finds out cpp is needed is
when it encounters a `{-# LANGUAGE CPP #-}` pragma.
In principle I suppose that ghc could unlit with cpp passthrough only for
the pass where it reads the module head to find pragmas, and then if cpp
is not required to re-unlit the file without the cpp passthrough mode.
Technically this probably does count as H98 non-compliance. The CPP
extension interferes with the use of # in ordinary (non-cpp) lhs files.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4836#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs