I have discovered a bug in the handling of hi files in the presence of 
-fglasgow-exts.  Below is a module, MyModule.hs, which uses Word internally 
but exports a function of type Integer->Integer.  There is also a Main.hs 
module which uses this function, but of course does not import Word since it 
doesn't need to.

Under ghc-3.02 I get the expected behaviour: I give -fglasgow-exts when 
compiling MyModule.hs, but not when compiling Main.hs.  I do, however, need to 
give -fglasgow-exts when linking.

Under ghc-4.01 (well, the head of the CVS tree as of yesterday), however, I 
need to give -fglasgow-exts when compiling Main.hs, too.  This is surely wrong!

I have attached a README giving a transcript of the session.

--KW 8-)
module MyModule ( myFun ) where

import Word ( Word32 )

myFun :: Integer -> Integer

myFun n = let w  :: Word32
              w  =  fromInteger n
              w' :: Word32
              w' =  w + 1
          in  toInteger w'

module Main ( main ) where

import MyModule ( myFun )

main = do { let n :: Integer
                n =  1
          ; print (myFun n)
          }
Keith Wansbrough 1998-12-17

I think I have found a bug in GHC regarding the -fglasgow-exts flag.
If I have a module that requires -fglasgow-exts, and export from this
module some functions and/or constructors that don't explicitly
mention this -fglasgow-exts stuff, I should be able to import the
module and use it in another module without -fglasgow-exts.  Certainly
the compiler needs to look at the exts libraries, but this should all
be behind the scenes in the hi-file-handling stuff.  This appears not
to be the case:

First, with ghc-3.02 pl 0:

sphere:FGEBug$ ghc-3.02 -c MyModule.hs
 
MyModule.hs:3: Could not find valid interface file `Word'
 
MyModule.hs:3: Module `Word' does not export `Word32'


Compilation had errors

[as I expected --KSW]
sphere:FGEBug$ ghc-3.02 -c MyModule.hs -fglasgow-exts
ghc-3.02: module version changed to 1; reason: no old .hi file
sphere:FGEBug$ ghc-3.02 -c Main.hs
ghc-3.02: module version changed to 1; reason: no old .hi file
sphere:FGEBug$ ghc-3.02 Main.o MyModule.o -o main
MyModule.o(.text+0x8e): undefined reference to `Word_Z36dIntegralWord320_closure'
MyModule.o(.text+0x13e): undefined reference to `Word_Z36dNumWord320_closure'
MyModule.o(.text+0x1de): undefined reference to `Word_Z36dNumWord320_closure'
MyModule.o(.text+0x27e): undefined reference to `Word_Z36dNumWord320_closure'

[annoying, but fair enough --KSW]
sphere:FGEBug$ ghc-3.02 Main.o MyModule.o -o main -fglasgow-exts
[now for some -v versions so you can see what's going on --KSW]
sphere:FGEBug$ ghc-3.02 -v Main.o MyModule.o -o main
The Glorious Glasgow Haskell Compilation System, version 3.02, patchlevel 0

Linker:
        gcc -v -u PrelBase_Z91Z93_closure -u PrelBase_IZh_static_info -u 
PrelBase_CZh_static_info -u PrelBase_False_inregs_info -u PrelBase_True_inregs_info -u 
DEBUG_REGS -o main Main.o MyModule.o /homes/kw217/ix86_linux/lib/ghc-3.02/TopClosure.o 
-L/homes/kw217/ix86_linux/lib/ghc-3.02  -lHS -lHS_cbits -lHSrts -lHSclib -lgmp -lm
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/specs
gcc version 2.7.2.3
 ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o main -u PrelBase_Z91Z93_closure 
-u PrelBase_IZh_static_info -u PrelBase_CZh_static_info -u PrelBase_False_inregs_info 
-u PrelBase_True_inregs_info -u DEBUG_REGS /usr/lib/crt1.o /usr/lib/crti.o 
/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/crtbegin.o 
-L/homes/kw217/ix86_linux/lib/ghc-3.02 -L/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3 
-L/usr/i386-redhat-linux/lib Main.o MyModule.o 
/homes/kw217/ix86_linux/lib/ghc-3.02/TopClosure.o -lHS -lHS_cbits -lHSrts -lHSclib 
-lgmp -lm -lgcc -lc -lgcc /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/crtend.o 
/usr/lib/crtn.o
MyModule.o(.text+0x8e): undefined reference to `Word_Z36dIntegralWord320_closure'
MyModule.o(.text+0x13e): undefined reference to `Word_Z36dNumWord320_closure'
MyModule.o(.text+0x1de): undefined reference to `Word_Z36dNumWord320_closure'
MyModule.o(.text+0x27e): undefined reference to `Word_Z36dNumWord320_closure'
Command exited with non-zero status 1
0.74user 0.53system 0:15.42elapsed 8%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (247major+668minor)pagefaults 0swaps
deleting... main

rm -f /tmp/ghc29648*
sphere:FGEBug$ ghc-3.02 -v Main.o MyModule.o -o main -fglasgow-exts
The Glorious Glasgow Haskell Compilation System, version 3.02, patchlevel 0

Linker:
        gcc -v -u PrelBase_Z91Z93_closure -u PrelBase_IZh_static_info -u 
PrelBase_CZh_static_info -u PrelBase_False_inregs_info -u PrelBase_True_inregs_info -u 
DEBUG_REGS -o main Main.o MyModule.o /homes/kw217/ix86_linux/lib/ghc-3.02/TopClosure.o 
-L/homes/kw217/ix86_linux/lib/ghc-3.02 -L/homes/kw217/ix86_linux/lib/ghc-3.02  
-lHSexts -lHS -lHS_cbits -lHSrts -lHSclib -lgmp -lm
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/specs
gcc version 2.7.2.3
 ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o main -u PrelBase_Z91Z93_closure 
-u PrelBase_IZh_static_info -u PrelBase_CZh_static_info -u PrelBase_False_inregs_info 
-u PrelBase_True_inregs_info -u DEBUG_REGS /usr/lib/crt1.o /usr/lib/crti.o 
/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/crtbegin.o 
-L/homes/kw217/ix86_linux/lib/ghc-3.02 -L/homes/kw217/ix86_linux/lib/ghc-3.02 
-L/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3 -L/usr/i386-redhat-linux/lib Main.o 
MyModule.o /homes/kw217/ix86_linux/lib/ghc-3.02/TopClosure.o -lHSexts -lHS -lHS_cbits 
-lHSrts -lHSclib -lgmp -lm -lgcc -lc -lgcc 
/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/crtend.o /usr/lib/crtn.o
0.91user 0.72system 0:15.66elapsed 10%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (245major+809minor)pagefaults 0swaps
Checking consistency of: main

rm -f /tmp/ghc29653*
sphere:FGEBug$ 



and then, with ghc-4.01 (freshly compiled) (and after removing the .hi
and .o files, of course):



sphere:FGEBug$ 
~/Scratch/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/ghc-4.01 -c 
MyModule.hs
 
MyModule.hs:3: Could not find valid interface file `Word'
 
MyModule.hs:3: Module `Word' does not export `Word32'


Compilation had errors
[as expected --KSW]
sphere:FGEBug$ 
~/Scratch/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/ghc-4.01 -c 
MyModule.hs -fglasgow-exts
ghc-4.01: module version changed to 1; reason: no old .hi file
sphere:FGEBug$ 
~/Scratch/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/ghc-4.01 -c Main.hs
 
Main.hs:1: Could not find valid interface file `Word'


Compilation had errors
[this is wrong!! --KSW]
sphere:FGEBug$ 
~/Scratch/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/ghc-4.01 -c 
Main.hs -fglasgow-exts
ghc-4.01: module version changed to 1; reason: no old .hi file
[hmmm, OK --KSW]
sphere:FGEBug$ 
~/Scratch/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/ghc-4.01 Main.o 
MyModule.o -o main
MyModule.o(.text+0x60): undefined reference to `Word__dNumWord320_closure'
MyModule.o(.text+0xf0): undefined reference to `Word__dNumWord320_closure'
MyModule.o(.text+0x170): undefined reference to `Word__dNumWord320_closure'
MyModule.o(.text+0x1f0): undefined reference to `Word__dIntegralWord320_closure'
MyModule.o(.data+0x10): undefined reference to `Word__dNumWord320_closure'
MyModule.o(.data+0x24): undefined reference to `Word__dNumWord320_closure'
MyModule.o(.data+0x38): undefined reference to `Word__dNumWord320_closure'
MyModule.o(.data+0x4c): undefined reference to `Word__dIntegralWord320_closure'
[again, hmm, OK --KSW]
sphere:FGEBug$ 
~/Scratch/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/ghc-4.01 Main.o 
MyModule.o -o main -fglasgow-exts
[now some -v stuff so you can see what's going on --KSW]
sphere:FGEBug$ 
~/Scratch/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/ghc-4.01 -v Main.o 
MyModule.o -o main
The Glorious Glasgow Haskell Compilation System, version 4.01, patchlevel 0
Linker: gcc -v -u PrelMain_mainIO_closure -u PrelBase_IZh_static_info -u 
PrelBase_CZh_static_info -u PrelBase_FZh_static_info -u PrelBase_DZh_static_info -u 
PrelAddr_AZh_static_info -u PrelAddr_WZh_static_info -u PrelAddr_I64Zh_static_info -u 
PrelAddr_W64Zh_static_info -u PrelForeign_StablePtr_static_info -u 
PrelBase_IZh_con_info -u PrelBase_CZh_con_info -u PrelBase_FZh_con_info -u 
PrelBase_DZh_con_info -u PrelAddr_AZh_con_info -u PrelAddr_WZh_con_info -u 
PrelAddr_I64Zh_con_info -u PrelAddr_W64Zh_con_info -u PrelForeign_StablePtr_con_info 
-u PrelBase_False_static_closure -u PrelBase_True_static_closure -u 
PrelPack_unpackCString_closure -o main Main.o MyModule.o  
-L/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../rts
 
-L/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../rts/gmp
 
-L/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../lib/std
 -L/local/scratch/kw217/Builds/i386-unknown-lin!
 ux/fptools-4.xx-current/ghc/driver
/../lib
/std/cbits  -lHS -lHS_cbits -lHSrts -lgmp -lm
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/specsgcc version 2.7.2.3 
ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o main -u PrelMain_mainIO_closure 
-u PrelBase_IZh_static_info -u PrelBase_CZh_static_info -u PrelBase_FZh_static_info -u 
PrelBase_DZh_static_info -u PrelAddr_AZh_static_info -u PrelAddr_WZh_static_info -u 
PrelAddr_I64Zh_static_info -u PrelAddr_W64Zh_static_info -u 
PrelForeign_StablePtr_static_info -u PrelBase_IZh_con_info -u PrelBase_CZh_con_info -u 
PrelBase_FZh_con_info -u PrelBase_DZh_con_info -u PrelAddr_AZh_con_info -u 
PrelAddr_WZh_con_info -u PrelAddr_I64Zh_con_info -u PrelAddr_W64Zh_con_info -u 
PrelForeign_StablePtr_con_info -u PrelBase_False_static_closure -u 
PrelBase_True_static_closure -u PrelPack_unpackCString_closure /usr/lib/crt1.o 
/usr/lib/crti.o /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/crtbegin.o 
-L/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../rts
 -L/local/scratch/kw217/Builds/i386-unknow!
 n-linux/fptools-4.xx-current/ghc/driver/../rts/gmp 
-L/local/scratch/kw217/Builds/i386-unknown-linux/f
ptools-4.xx-current
/ghc/driver/../lib/std 
-L/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../lib/std/cbits
 -L/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3 -L/usr/i386-redhat-linux/lib Main.o 
MyModule.o -lHS -lHS_cbits -lHSrts -lgmp -lm -lgcc -lc -lgcc 
/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/crtend.o /usr/lib/crtn.o
MyModule.o(.text+0x60): undefined reference to `Word__dNumWord320_closure'
MyModule.o(.text+0xf0): undefined reference to `Word__dNumWord320_closure'
MyModule.o(.text+0x170): undefined reference to `Word__dNumWord320_closure'
MyModule.o(.text+0x1f0): undefined reference to `Word__dIntegralWord320_closure'
MyModule.o(.data+0x10): undefined reference to `Word__dNumWord320_closure'
MyModule.o(.data+0x24): undefined reference to `Word__dNumWord320_closure'
MyModule.o(.data+0x38): undefined reference to `Word__dNumWord320_closure'
MyModule.o(.data+0x4c): undefined reference to `Word__dIntegralWord320_closure'
Command exited with non-zero status 1
0.65user 0.45system 0:21.65elapsed 5%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (247major+743minor)pagefaults 0swaps
deleting... main

rm -f /tmp/ghc29731*
sphere:FGEBug$ 
~/Scratch/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/ghc-4.01 -v Main.o 
MyModule.o -o main -fglasgow-exts
The Glorious Glasgow Haskell Compilation System, version 4.01, patchlevel 0
Linker: gcc -v -u PrelMain_mainIO_closure -u PrelBase_IZh_static_info -u 
PrelBase_CZh_static_info -u PrelBase_FZh_static_info -u PrelBase_DZh_static_info -u 
PrelAddr_AZh_static_info -u PrelAddr_WZh_static_info -u PrelAddr_I64Zh_static_info -u 
PrelAddr_W64Zh_static_info -u PrelForeign_StablePtr_static_info -u 
PrelBase_IZh_con_info -u PrelBase_CZh_con_info -u PrelBase_FZh_con_info -u 
PrelBase_DZh_con_info -u PrelAddr_AZh_con_info -u PrelAddr_WZh_con_info -u 
PrelAddr_I64Zh_con_info -u PrelAddr_W64Zh_con_info -u PrelForeign_StablePtr_con_info 
-u PrelBase_False_static_closure -u PrelBase_True_static_closure -u 
PrelPack_unpackCString_closure -o main Main.o MyModule.o  
-L/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../rts
 
-L/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../rts/gmp
 
-L/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../lib/std
 -L/local/scratch/kw217/Builds/i386-unknown-lin!
 ux/fptools-4.xx-current/ghc/driver
/../lib
/std/cbits 
-L/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../lib/exts
  -lHSexts -lHS -lHS_cbits -lHSrts -lgmp -lm
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/specsgcc version 2.7.2.3 
ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o main -u PrelMain_mainIO_closure 
-u PrelBase_IZh_static_info -u PrelBase_CZh_static_info -u PrelBase_FZh_static_info -u 
PrelBase_DZh_static_info -u PrelAddr_AZh_static_info -u PrelAddr_WZh_static_info -u 
PrelAddr_I64Zh_static_info -u PrelAddr_W64Zh_static_info -u 
PrelForeign_StablePtr_static_info -u PrelBase_IZh_con_info -u PrelBase_CZh_con_info -u 
PrelBase_FZh_con_info -u PrelBase_DZh_con_info -u PrelAddr_AZh_con_info -u 
PrelAddr_WZh_con_info -u PrelAddr_I64Zh_con_info -u PrelAddr_W64Zh_con_info -u 
PrelForeign_StablePtr_con_info -u PrelBase_False_static_closure -u 
PrelBase_True_static_closure -u PrelPack_unpackCString_closure /usr/lib/crt1.o 
/usr/lib/crti.o /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/crtbegin.o 
-L/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../rts
 -L/local/scratch/kw217/Builds/i386-unknow!
 n-linux/fptools-4.xx-current/ghc/driver/../rts/gmp 
-L/local/scratch/kw217/Builds/i386-unknown-linux/f
ptools-4.xx-current
/ghc/driver/../lib/std 
-L/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../lib/std/cbits
 
-L/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../lib/exts
 -L/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3 -L/usr/i386-redhat-linux/lib Main.o 
MyModule.o -lHSexts -lHS -lHS_cbits -lHSrts -lgmp -lm -lgcc -lc -lgcc 
/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/crtend.o /usr/lib/crtn.o
0.78user 0.46system 0:16.46elapsed 7%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (245major+884minor)pagefaults 0swaps

rm -f /tmp/ghc29792*
sphere:FGEBug$ 
~/Scratch/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/ghc-4.01 -v -c 
Main.hs
The Glorious Glasgow Haskell Compilation System, version 4.01, patchlevel 0

Effective command line: -v -c

Ineffective C pre-processor:
        echo '{-# LINE 1 "Main.hs" -}' > /tmp/ghc29804.cpp && cat Main.hs >> 
/tmp/ghc29804.cpp
0.00user 0.00system 0:00.05elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (75major+10minor)pagefaults 0swaps

Haskell compiler:
        
/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../compiler/hsc
 ,-W ,/tmp/ghc29804.cpp  -fignore-interface-pragmas -fomit-interface-pragmas 
-fusagesp-inf -fsimplify [  -ffloat-lets-exposing-whnf -ffloat-primops-ok 
-fcase-of-case -fdo-case-elim -freuse-con -fpedantic-bottoms 
-fmax-simplifier-iterations4  ]  -fusagesp-inf  -fwarn-overlapping-patterns 
-fwarn-missing-methods -fwarn-duplicate-exports -fhi-version=401 
-himap=.%.hi:/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../lib/std%.hi
   -v -hifile=/tmp/ghc29804.hi -C=/tmp/ghc29804.hc -F=/tmp/ghc29804_stb.c 
-FH=/tmp/ghc29804_stb.h +RTS -H6000000 -K1000000
Glasgow Haskell Compiler, version 4.01, for Haskell 1.4
 
Main.hs:1: Could not find valid interface file `Word'


Compilation had errors
Command exited with non-zero status 1
3.79user 0.05system 0:04.31elapsed 88%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (632major+1620minor)pagefaults 0swaps
deleting... /tmp/ghc29804.cpp /tmp/ghc29804.hi /tmp/ghc29804.hc /tmp/ghc29804_stb.c 
/tmp/ghc29804_stb.h

rm -f /tmp/ghc29804*
sphere:FGEBug$ 
~/Scratch/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/ghc-4.01 -v -c 
Main.hs -fglasgow-exts
The Glorious Glasgow Haskell Compilation System, version 4.01, patchlevel 0

Effective command line: -v -c -fglasgow-exts

Ineffective C pre-processor:
        echo '{-# LINE 1 "Main.hs" -}' > /tmp/ghc29813.cpp && cat Main.hs >> 
/tmp/ghc29813.cpp
0.01user 0.01system 0:00.02elapsed 74%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (73major+10minor)pagefaults 0swaps

Haskell compiler:
        
/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../compiler/hsc
 ,-N ,-W ,/tmp/ghc29813.cpp  -fglasgow-exts -fignore-interface-pragmas 
-fomit-interface-pragmas -fusagesp-inf -fsimplify [  -ffloat-lets-exposing-whnf 
-ffloat-primops-ok -fcase-of-case -fdo-case-elim -freuse-con -fpedantic-bottoms 
-fmax-simplifier-iterations4  ]  -fusagesp-inf  -fwarn-overlapping-patterns 
-fwarn-missing-methods -fwarn-duplicate-exports -fhi-version=401 
-himap=.%.hi:/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../lib/exts%.hi:/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../lib/exts%.hi:/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../lib/std%.hi
   -v -hifile=/tmp/ghc29813.hi -C=/tmp/ghc29813.hc -F=/tmp/ghc29813_stb.c 
-FH=/tmp/ghc29813_stb.h +RTS -H6000000 -K1000000
Glasgow Haskell Compiler, version 4.01, for Haskell 1.4
4.72user 0.20system 0:05.28elapsed 93%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (1069major+1662minor)pagefaults 0swaps

Pin on Haskell consistency info:
        echo 'static char ghc_hsc_ID[] = "@(#)hsc Main.hs       40.0,,";' >> 
/tmp/ghc29813.hc
0.00user 0.01system 0:00.03elapsed 30%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (73major+10minor)pagefaults 0swaps
*** New hi file follows...
__interface Main 401 where
import IO 2 :: print 1;
import MyModule 1 :: myFun 1;
import PrelBase 1 :: _dEq0 1 _dEq1 1 _dEqBool0 1 _dEqChar0 1 _dEqInt0 1 _dEqInteger0 1 
_dMonad0 1 _dMonadZero0 1 _dNumInt0 1 _dShow0 1 _dShow1 1 _dShow2 1 _dShowBool0 1 
_dShowChar0 1 _dShowInt0 1 _mfromInt 1 _mshowList 1 _nde 1 _ngg 1 _nm 1 addr2Integer 1 
foldr 1 int2Integer 1 integer_0 1 integer_1 1 integer_2 1 integer_m1 1 Eq 1 Monad 1 
MonadZero 1 Num 1 Show 1 String 1;
import PrelIOBase 2 :: _dMonadIO0 1 IO 2;
import PrelNum 1 :: _dNumInteger0 1 _dShowInteger0 1;
import PrelNumExtra 2 :: _dEqDouble0 1 _dNumDouble0 1 _dShowDouble0 1;
import PrelPack 2 :: packCString# 1 unpackAppendCString# 1 unpackCString# 1 
unpackFoldrCString# 1 unpackNBytes# 1;
__instimport IO ; __instimport PrelAddr ; __instimport PrelArr ; __instimport 
PrelBounded ; __instimport PrelCCall ; __instimport PrelConc ; __instimport 
PrelForeign ; __instimport PrelIOBase ; __instimport PrelNum ; __instimport 
PrelNumExtra ; __instimport PrelTup ; __instimport Word ;

__export Main main;
main :: PrelIOBase.IO PrelBase.() ;


ghc-4.01: module version unchanged at 1

Replace .hi file, if changed:
        cmp -s Main.hi /tmp/ghc29813.hi-new || ( rm -f Main.hi && cp 
/tmp/ghc29813.hi-new Main.hi )
0.01user 0.00system 0:00.07elapsed 13%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (69major+11minor)pagefaults 0swaps

C compiler:
        gcc -v  -S -Wimplicit -O -DSTOLEN_X86_REGS=4 -fomit-frame-pointer 
-fno-defer-pop  -I. 
-I/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../includes
 ghc29813.c > /tmp/ghc29813.ccout 2>&1 && ( if [ ghc29813.s != /tmp/ghc29813_o.s ] ; 
then mv ghc29813.s /tmp/ghc29813_o.s ; else exit 0 ; fi )
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/specs
gcc version 2.7.2.3
 /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/cpp -lang-c -v -I. 
-I/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../includes
 -undef -D__GNUC__=2 -D__GNUC_MINOR__=7 -D__ELF__ -Dunix -Di386 -Dlinux -D__ELF__ 
-D__unix__ -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -Asystem(unix) 
-Asystem(posix) -Acpu(i386) -Amachine(i386) -D__OPTIMIZE__ -Wimplicit 
-DSTOLEN_X86_REGS=4 ghc29813.c /tmp/cca29830.i
GNU CPP version 2.7.2.3 (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 .
 
/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../includes
 /usr/local/include
 /usr/i386-redhat-linux/include
 /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/cc1 /tmp/cca29830.i -quiet -dumpbase 
ghc29813.c -O -Wimplicit -version -fomit-frame-pointer -fno-defer-pop -o ghc29813.s
GNU C version 2.7.2.3 (i386 Linux/ELF) compiled by GNU C version 2.7.2.3.
0.30user 0.16system 0:01.32elapsed 34%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (563major+427minor)pagefaults 0swaps

Unix assembler:
        gcc -o Main.o -c  -I. 
-I/local/scratch/kw217/Builds/i386-unknown-linux/fptools-4.xx-current/ghc/driver/../includes
 /tmp/ghc29813.s
0.02user 0.01system 0:00.29elapsed 10%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (227major+90minor)pagefaults 0swaps

rm -f /tmp/ghc29813*
sphere:FGEBug$ 

: Keith Wansbrough, MSc, BSc(Hons) (Auckland) ------------------------:
: PhD Student, Computer Laboratory, University of Cambridge, England. :
:  (and recently of the University of Glasgow, Scotland. [><] )       :
: Native of Antipodean Auckland, New Zealand: 174d47' E, 36d55' S.    :
: http://www.cl.cam.ac.uk/users/kw217/  mailto:[EMAIL PROTECTED]     :
:---------------------------------------------------------------------:

Reply via email to