Opened 10 years ago

Closed 8 years ago

#3675 closed bug (invalid)

load fails with Literate target contents

Reported by: JeanPhilippeMoresmau Owned by:
Priority: normal Milestone: 7.4.1
Component: GHC API Version: 6.10.4
Keywords: preprocess Literate Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Incorrect warning at compile-time Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by igloo)

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

(src_fn is the file name, endings in .lhs in my case)

DriverPhase.hs line 146:

startPhase "lhs"      = Unlit HsSrcFile

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.

I can try to actually code the patch, but I've never tried to build GHC on my machine....

Change History (7)

comment:1 Changed 10 years ago by igloo

Description: modified (diff)

comment:2 Changed 10 years ago by igloo

Milestone: 6.14.1

Thanks for the report.

comment:3 Changed 9 years ago by igloo

Milestone: 7.0.17.0.2

comment:4 Changed 9 years ago by igloo

Milestone: 7.0.27.2.1

comment:5 Changed 8 years ago by igloo

Description: modified (diff)

comment:6 Changed 8 years ago by igloo

Milestone: 7.2.17.4.1
Status: newinfoneeded

Is this still an issue? If so, can you give us a complete test case so that we can reproduce the problem, please?

comment:7 Changed 8 years ago by igloo

difficulty: Unknown
Resolution: invalid
Status: infoneededclosed

No response from submitter, so closing.

Note: See TracTickets for help on using tickets.