weird compiler bug/failed to load interface

Simon Peyton-Jones simonpj@microsoft.com
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
release.

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

Simon

| -----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
|=20
|=20
| 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:
|=20
| Skipping  Pattern          ( Pattern.hs, Pattern.o )
|=20
| failed to load interface for `Pattern':
|     Could not find interface file for `Pattern'
|=20
| Failed to find interface decl for `Pattern.a'
| from module `Pattern'
|=20
| if I "ls Pattern.*" I get Pattern.hi, Pattern.hs and Pattern.o.
|=20
| In order to get it to compile correctly, I have to rm=20
| Pattern.o and then rerun ghc on the Main module.
|=20
| I've attached the Pattern.hs fyi.  If anyone has any=20
| suggestions, please let me know.  (btw, I'm using --make)
|=20
| Thanks!
|=20
|  - Hal
|=20
| --
| Hal Daume III
|=20
|  "Computer science is no more about computers    | hdaume@isi.edu
|   than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume
|=20