#3675: load fails with Literate target contents
------------------------------------------------+---------------------------
Reporter: JeanPhilippeMoresmau | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: GHC API | Version: 6.10.4
Resolution: | Keywords: preprocess
Literate
Difficulty: | Os:
Unknown/Multiple
Testcase: | Architecture:
Unknown/Multiple
Failure: Incorrect warning at compile-time |
------------------------------------------------+---------------------------
Changes (by igloo):
* difficulty: =>
Old description:
> I am loading a target with actual contents (targetContents=Just
> (contents, time)). The contents are literate Haskell. I get compilation
> errors instead of the "preprocessing needed, interactive check disabled"
> error I should get. It works if I manually set the Phase to Unlit
> HsSrcFile, but the doc says it should guess it's literate from the file
> extension. I'm using 6.10.4 in Windows.[[BR]]
>
> GHC.hs line 2240: [[BR]]
> Nothing <- mb_phase, Unlit _ <- startPhase src_fn = True[[BR]]
>
> (src_fn is the file name, endings in .lhs in my case)[[BR]]
>
> DriverPhase.hs line 146:[[BR]]
> startPhase "lhs" = Unlit HsSrcFile[[BR]]
>
> Somewhere in there we forgot to move from "/drive/dir/foo.lhs" to "lhs".
> We need something like tail $ takeExtension $ src_fn, and handling
> gracefully the case where there is no extension.[[BR]]
>
> I can try to actually code the patch, but I've never tried to build GHC
> on my machine....
New description:
I am loading a target with actual contents (targetContents=Just (contents,
time)). The contents are literate Haskell. I get compilation errors
instead of the "preprocessing needed, interactive check disabled" error I
should get. It works if I manually set the Phase to Unlit `HsSrcFile`, but
the doc says it should guess it's literate from the file extension. I'm
using 6.10.4 in Windows.
`GHC.hs` line 2240:
{{{
Nothing <- mb_phase, Unlit _ <- startPhase src_fn = True[[BR]]
}}}
(src_fn is the file name, endings in .lhs in my case)[[BR]]
`DriverPhase.hs` line 146:
{{{
startPhase "lhs" = Unlit HsSrcFile[[BR]]
}}}
Somewhere in there we forgot to move from "/drive/dir/foo.lhs" to "lhs".
We need something like tail $ takeExtension $ src_fn, and handling
gracefully the case where there is no extension.[[BR]]
I can try to actually code the patch, but I've never tried to build GHC on
my machine....
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3675#comment:1>
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