diff options
author | simonpj <unknown> | 2005-01-27 10:45:48 +0000 |
---|---|---|
committer | simonpj <unknown> | 2005-01-27 10:45:48 +0000 |
commit | 508a505e9853984bfdaa3ad855ae3fcbc6d31787 (patch) | |
tree | afeecb94e0ff35cb877e5d48e110c39b0ce6993f /ghc/compiler/codeGen | |
parent | f9d8c8e0ab44b24d06b654d98543e8b39d4ebeca (diff) | |
download | haskell-508a505e9853984bfdaa3ad855ae3fcbc6d31787.tar.gz |
[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.
Diffstat (limited to 'ghc/compiler/codeGen')
-rw-r--r-- | ghc/compiler/codeGen/CgBindery.hi-boot | bin | 270 -> 1407 bytes | |||
-rw-r--r-- | ghc/compiler/codeGen/CgBindery.lhs-boot | 11 | ||||
-rw-r--r-- | ghc/compiler/codeGen/CgExpr.hi-boot | bin | 109 -> 1948 bytes | |||
-rw-r--r-- | ghc/compiler/codeGen/CgExpr.lhs-boot | 7 | ||||
-rw-r--r-- | ghc/compiler/codeGen/ClosureInfo.lhs-boot | 6 |
5 files changed, 24 insertions, 0 deletions
diff --git a/ghc/compiler/codeGen/CgBindery.hi-boot b/ghc/compiler/codeGen/CgBindery.hi-boot Binary files differindex f80decba35..398791a038 100644 --- a/ghc/compiler/codeGen/CgBindery.hi-boot +++ b/ghc/compiler/codeGen/CgBindery.hi-boot diff --git a/ghc/compiler/codeGen/CgBindery.lhs-boot b/ghc/compiler/codeGen/CgBindery.lhs-boot new file mode 100644 index 0000000000..e504a6a9ba --- /dev/null +++ b/ghc/compiler/codeGen/CgBindery.lhs-boot @@ -0,0 +1,11 @@ +\begin{code} +module CgBindery where +import VarEnv( IdEnv ) + +data CgIdInfo +data VolatileLoc +data StableLoc +type CgBindings = IdEnv CgIdInfo + +nukeVolatileBinds :: CgBindings -> CgBindings +\end{code}
\ No newline at end of file diff --git a/ghc/compiler/codeGen/CgExpr.hi-boot b/ghc/compiler/codeGen/CgExpr.hi-boot Binary files differindex a091afa31f..6794d184cd 100644 --- a/ghc/compiler/codeGen/CgExpr.hi-boot +++ b/ghc/compiler/codeGen/CgExpr.hi-boot diff --git a/ghc/compiler/codeGen/CgExpr.lhs-boot b/ghc/compiler/codeGen/CgExpr.lhs-boot new file mode 100644 index 0000000000..29cdc3a605 --- /dev/null +++ b/ghc/compiler/codeGen/CgExpr.lhs-boot @@ -0,0 +1,7 @@ +\begin{code} +module CgExpr where +import StgSyn( StgExpr ) +import CgMonad( Code ) + +cgExpr :: StgExpr -> Code +\end{code} diff --git a/ghc/compiler/codeGen/ClosureInfo.lhs-boot b/ghc/compiler/codeGen/ClosureInfo.lhs-boot new file mode 100644 index 0000000000..b069905d3e --- /dev/null +++ b/ghc/compiler/codeGen/ClosureInfo.lhs-boot @@ -0,0 +1,6 @@ +\begin{code} +module ClosureInfo where + +data LambdaFormInfo +data ClosureInfo +\end{code}
\ No newline at end of file |