|
RE: -fwarn-unused-imports confused by hi-boot files: msg#00076lang.haskell.glasgow.bugs
Yes, you want to say import {-# SOURCE #-} A () In principle you can just import B.hi-boot, but it says module B where type AS = [A.A] so GHC tries to find A.hi. The error message is bad, and the HEAD instead says Bad interface file: ./A.hi ./A.hi: openBinaryFile: does not exist (No such file or directory) which is better. The SOURCE import of A is reqd to tell GHC to get the hi-boot file. Annoying I agree. I'll add something to the documentation. Simon | -----Original Message----- | From: glasgow-haskell-bugs-bounces@xxxxxxxxxxx [mailto:glasgow-haskell-bugs- | bounces@xxxxxxxxxxx] On Behalf Of George Russell | Sent: 16 September 2004 15:49 | To: glasgow-haskell-bugs@xxxxxxxxxxx | Subject: -fwarn-unused-imports confused by hi-boot files | | # ghc -fwarn-unused-imports C.hs | | C.hs:1: | Warning: Module `A' is imported, but nothing from it is used | (except perhaps instances visible in `A') | | | | However if I comment out the import of A I get | | | ./B.hi-boot:3: | tcLookup: `A.A' is not in scope | In the type synonym declaration for `AS' | | C.hs:1: | Failed to load interface for `A': | Bad interface file: ./A.hi | ./A.hi: openBinaryFile: does not exist (No such file or directory) | | C.hs:1: | Failed to find interface decl for `A.A' | from module `A' | | C.hs:1: | Failed to find interface decl for `A.A' | from module `A'
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: Template Haskell and boot files, Simon Peyton-Jones |
|---|---|
| Next by Date: | [ ghc-Bugs-1037485 ] compiled program reports internal error when you hit ctrl-C, SourceForge.net |
| Previous by Thread: | -fwarn-unused-imports confused by hi-boot files, George Russell |
| Next by Thread: | GHC confused by hi-boot files, George Russell |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |