Skip to content

ghc -c 7.8 drops last char of file name if -osuf contains a dot

I discovered that if I compile with ghc -c -osuf .something Myfile.hs where Myfile.hs contains TH and thus has to dynamically link in, say, Other.hs, I get the error that

Myfile.hs:1:1:
    cannot find normal object file 'Othe.dyn_o`
    while linking an interpreted expression

So Other was wrongly made into Othe, dropping the last character.

If I don't pass -osuf .something, or have it not have a dot, everything's fine.

The trouble is that -osuf .something worked fine in GHC <= 7.6.

So I believe this is a regression, or at least a very bad error message.

Trac metadata
Trac field Value
Version 7.8.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Build System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC aehlig@google.com, nh2
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information