[project @ 2005-01-27 10:44:00 by simonpj]
authorsimonpj <unknown>
Thu, 27 Jan 2005 10:45:48 +0000 (10:45 +0000)
committersimonpj <unknown>
Thu, 27 Jan 2005 10:45:48 +0000 (10:45 +0000)
commit508a505e9853984bfdaa3ad855ae3fcbc6d31787
treeafeecb94e0ff35cb877e5d48e110c39b0ce6993f
parentf9d8c8e0ab44b24d06b654d98543e8b39d4ebeca
[project @ 2005-01-27 10:44:00 by simonpj]
--------------------------------------------
          Replace hi-boot files with hs-boot files
   --------------------------------------------

This major commit completely re-organises the way that recursive modules
are dealt with.

  * It should have NO EFFECT if you do not use recursive modules

  * It is a BREAKING CHANGE if you do

====== Warning: .hi-file format has changed, so if you are
====== updating into an existing HEAD build, you'll
====== need to make clean and re-make

The details:  [documentation still to be done]

* Recursive loops are now broken with Foo.hs-boot (or Foo.lhs-boot),
  not Foo.hi-boot

* An hs-boot files is a proper source file.  It is compiled just like
  a regular Haskell source file:
ghc Foo.hs generates Foo.hi, Foo.o
ghc Foo.hs-boot generates Foo.hi-boot, Foo.o-boot

* hs-boot files are precisely a subset of Haskell. In particular:
- they have the same import, export, and scoping rules
- errors (such as kind errors) in hs-boot files are checked
  You do *not* need to mention the "original" name of something in
  an hs-boot file, any more than you do in any other Haskell module.

* The Foo.hi-boot file generated by compiling Foo.hs-boot is a machine-
  generated interface file, in precisely the same format as Foo.hi

* When compiling Foo.hs, its exports are checked for compatibility with
  Foo.hi-boot (previously generated by compiling Foo.hs-boot)

* The dependency analyser (ghc -M) knows about Foo.hs-boot files, and
  generates appropriate dependencies.  For regular source files it
  generates
Foo.o : Foo.hs
Foo.o : Baz.hi -- Foo.hs imports Baz
Foo.o : Bog.hi-boot -- Foo.hs source-imports Bog

  For a hs-boot file it generates similar dependencies
Bog.o-boot : Bog.hs-boot
Bog.o-boot : Nib.hi -- Bog.hs-boto imports Nib

* ghc -M is also enhanced to use the compilation manager dependency
  chasing, so that
ghc -M Main
  will usually do the job.  No need to enumerate all the source files.

* The -c flag is no longer a "compiler mode". It simply means "omit the
  link step", and synonymous with -no-link.
85 files changed:
ghc/compiler/Makefile
ghc/compiler/basicTypes/DataCon.hi-boot
ghc/compiler/basicTypes/DataCon.lhs-boot [new file with mode: 0644]
ghc/compiler/basicTypes/IdInfo.hi-boot
ghc/compiler/basicTypes/IdInfo.lhs-boot [new file with mode: 0644]
ghc/compiler/basicTypes/MkId.hi-boot
ghc/compiler/basicTypes/MkId.lhs-boot [new file with mode: 0644]
ghc/compiler/basicTypes/Module.lhs
ghc/compiler/basicTypes/Module.lhs-boot [new file with mode: 0644]
ghc/compiler/basicTypes/Name.hi-boot
ghc/compiler/basicTypes/Name.lhs-boot [new file with mode: 0644]
ghc/compiler/basicTypes/OccName.lhs-boot [new file with mode: 0644]
ghc/compiler/codeGen/CgBindery.hi-boot
ghc/compiler/codeGen/CgBindery.lhs-boot [new file with mode: 0644]
ghc/compiler/codeGen/CgExpr.hi-boot
ghc/compiler/codeGen/CgExpr.lhs-boot [new file with mode: 0644]
ghc/compiler/codeGen/ClosureInfo.lhs-boot [new file with mode: 0644]
ghc/compiler/compMan/CompManager.lhs
ghc/compiler/deSugar/Desugar.lhs
ghc/compiler/deSugar/DsExpr.hi-boot
ghc/compiler/deSugar/DsExpr.lhs-boot [new file with mode: 0644]
ghc/compiler/deSugar/DsMonad.lhs
ghc/compiler/deSugar/DsUtils.lhs
ghc/compiler/deSugar/Match.hi-boot
ghc/compiler/deSugar/Match.hi-boot-6
ghc/compiler/deSugar/Match.lhs-boot [new file with mode: 0644]
ghc/compiler/ghci/Linker.lhs
ghc/compiler/hsSyn/HsBinds.lhs
ghc/compiler/hsSyn/HsExpr.hi-boot
ghc/compiler/hsSyn/HsExpr.lhs-boot [new file with mode: 0644]
ghc/compiler/hsSyn/HsPat.lhs-boot [new file with mode: 0644]
ghc/compiler/iface/BinIface.hs
ghc/compiler/iface/IfaceType.lhs
ghc/compiler/iface/LoadIface.lhs
ghc/compiler/iface/MkIface.lhs
ghc/compiler/iface/TcIface.lhs-boot [new file with mode: 0644]
ghc/compiler/main/CmdLineOpts.lhs
ghc/compiler/main/CodeOutput.lhs
ghc/compiler/main/DriverFlags.hs
ghc/compiler/main/DriverMkDepend.hs
ghc/compiler/main/DriverPhases.hs
ghc/compiler/main/DriverPipeline.hs
ghc/compiler/main/DriverState.hs
ghc/compiler/main/Finder.lhs
ghc/compiler/main/GetImports.hs
ghc/compiler/main/HscMain.lhs
ghc/compiler/main/HscTypes.lhs
ghc/compiler/main/Main.hs
ghc/compiler/main/Packages.lhs-boot [new file with mode: 0644]
ghc/compiler/parser/Parser.y.pp
ghc/compiler/parser/RdrHsSyn.lhs
ghc/compiler/rename/RnBinds.lhs
ghc/compiler/rename/RnExpr.lhs
ghc/compiler/rename/RnNames.lhs
ghc/compiler/rename/RnSource.lhs
ghc/compiler/rename/RnSource.lhs-boot [new file with mode: 0644]
ghc/compiler/typecheck/TcBinds.lhs
ghc/compiler/typecheck/TcClassDcl.lhs
ghc/compiler/typecheck/TcDeriv.lhs
ghc/compiler/typecheck/TcExpr.hi-boot
ghc/compiler/typecheck/TcExpr.hi-boot-6
ghc/compiler/typecheck/TcExpr.lhs-boot [new file with mode: 0644]
ghc/compiler/typecheck/TcForeign.lhs
ghc/compiler/typecheck/TcHsType.lhs
ghc/compiler/typecheck/TcMatches.hi-boot
ghc/compiler/typecheck/TcMatches.hi-boot-6
ghc/compiler/typecheck/TcMatches.lhs-boot [new file with mode: 0644]
ghc/compiler/typecheck/TcRnDriver.lhs
ghc/compiler/typecheck/TcRnMonad.lhs
ghc/compiler/typecheck/TcRnTypes.lhs
ghc/compiler/typecheck/TcSplice.hi-boot-6
ghc/compiler/typecheck/TcSplice.lhs-boot [new file with mode: 0644]
ghc/compiler/typecheck/TcTyClsDecls.lhs
ghc/compiler/typecheck/TcType.hi-boot
ghc/compiler/typecheck/TcType.lhs
ghc/compiler/typecheck/TcType.lhs-boot [new file with mode: 0644]
ghc/compiler/typecheck/TcUnify.hi-boot
ghc/compiler/typecheck/TcUnify.lhs
ghc/compiler/typecheck/TcUnify.lhs-boot [new file with mode: 0644]
ghc/compiler/types/TyCon.hi-boot
ghc/compiler/types/TyCon.lhs-boot [new file with mode: 0644]
ghc/compiler/types/TypeRep.hi-boot
ghc/compiler/types/TypeRep.lhs-boot [new file with mode: 0644]
ghc/docs/comm/genesis/modules.html
ghc/utils/ghc-pkg/Main.hs