Skip to content

load fails with Literate target contents

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....

Edited by Ian Lynagh -
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information