weird compiler bug/failed to load interface

Simon Peyton-Jones
Mon, 7 Jan 2002 02:36:21 -0800

Hal, =20

Do please say what version of GHC you are using when reporting bugs!

I can reproduce this with -O2, but not with -O.  That's good, because
it's a bug we fixed last week.  It'll be fixed in the upcoming 5.02.2

thanks for reporting it.  The workaround is not to use -O2 for


| -----Original Message-----
| From: Hal Daume III [mailto:hdaume@ISI.EDU]=20
| Sent: 04 January 2002 17:36
| To: GHC Users Mailing List
| Subject: weird compiler bug/failed to load interface
| There's one module I wrote that I use in a lot of my programs=20
| and for some reason, whenever I compile a program using this=20
| module with -O or -O2, make changes to the Main, and then=20
| recompile, I get the following error from ghc:
| Skipping  Pattern          ( Pattern.hs, Pattern.o )
| failed to load interface for `Pattern':
|     Could not find interface file for `Pattern'
| Failed to find interface decl for `Pattern.a'
| from module `Pattern'
| if I "ls Pattern.*" I get Pattern.hi, Pattern.hs and Pattern.o.
| In order to get it to compile correctly, I have to rm=20
| Pattern.o and then rerun ghc on the Main module.
| I've attached the Pattern.hs fyi.  If anyone has any=20
| suggestions, please let me know.  (btw, I'm using --make)
| Thanks!
|  - Hal
| --
| Hal Daume III
|  "Computer science is no more about computers    |
|   than astronomy is about telescopes." -Dijkstra |