[[project @ 2003-04-25 09:17:05 by simonmar]
simonmar**20030425091705
- Add a note about the incorrect handling of the 'module Main where'
header.
- While I'm here: fix out of date stuff, reformat and generally tidy up.
] {
hunk ./ghc/docs/users_guide/bugs.sgml 2
-
Known bugs and infelicities
-
+ Known bugs and infelicities
hunk ./ghc/docs/users_guide/bugs.sgml 4
-
- Haskell 98 vs. Glasgow Haskell: language non-compliance
+
+ Haskell 98 vs. Glasgow Haskell: language non-compliance
hunk ./ghc/docs/users_guide/bugs.sgml 7
-
- GHC vs the Haskell 98 language
- Haskell 98 language vs GHC
+
+ GHC vs the Haskell 98 language
+ Haskell 98 language vs GHC
hunk ./ghc/docs/users_guide/bugs.sgml 42
-
-
- When is on, GHC
- reserves several keywords beginning with two underscores.
- This is due to the fact that GHC uses the same lexical
- analyser for interface file parsing as it does for source
- file parsing, and these keywords are used in interface
- files. Do not use any identifiers beginning with a double
- underscore in mode.
-
hunk ./ghc/docs/users_guide/bugs.sgml 78
-
-
- Very long String constants:
-
- May not go through. If you add a “string
- gap” every few thousand characters, then the strings
- can be as long as you like.
-
- Bear in mind that string gaps and the
-
- option don't mix very well (see
- ).
-
-
-
+ None known.
hunk ./ghc/docs/users_guide/bugs.sgml 88
+
+
+ Module system and interface files
+
+
+
+ Main module
+
+ GHC interprets the module header
+module Main where
+ as if it was
+module Main (main) where
+
hunk ./ghc/docs/users_guide/bugs.sgml 102
-
- Module system and interface files
-
-
+ This change allows GHC to optimise slightly more
+ aggresively inside the Main
+ module.
hunk ./ghc/docs/users_guide/bugs.sgml 106
-
- Namespace pollution
-
- Several modules internal to GHC are visible in the
- standard namespace. All of these modules begin with
- Prel, so the rule is: don't use any
- modules beginning with Prel in your
- program, or you may be comprehensively screwed.
-
-
-
+ You are highly unlikely to notice the difference, since
+ importing Main is very rare (it would
+ introduce a recursive module dependency, so doing it by
+ accident is unlikely too).
+
+
+
hunk ./ghc/docs/users_guide/bugs.sgml 137
- In Prelude support
+ In Prelude support
hunk ./ghc/docs/users_guide/bugs.sgml 156
- Tuples are currently limited to size 61. HOWEVER:
+ Tuples are currently limited to size 100. HOWEVER:
hunk ./ghc/docs/users_guide/bugs.sgml 161
- only up to 5-tuples.
+ only up to 16-tuples.
hunk ./ghc/docs/users_guide/bugs.sgml 265
-
+
+
hunk ./ghc/docs/users_guide/bugs.sgml 268
-
hunk ./ghc/docs/users_guide/bugs.sgml 269
+
+ Known bugs or infelicities
hunk ./ghc/docs/users_guide/bugs.sgml 272
-
- Known bugs or infelicities
+ In addition to the divergences from the Haskell 98 standard
+ listed above, GHC has the following known bugs or
+ infelicities.
hunk ./ghc/docs/users_guide/bugs.sgml 276
-GHC has the following known bugs or infelicities:
-
+
+
+ GHC can warn about non-exhaustive or overlapping
+ patterns (see , and usually
+ does so correctly. But not always. It gets confused by
+ string patterns, and by guards, and can then emit bogus
+ warnings. The entire overlap-check code needs an overhaul
+ really.
+
hunk ./ghc/docs/users_guide/bugs.sgml 286
-
-GHC only provides tuples up to size 62, and derived tuple instances (for
-Eq, Ord, etc) up to size 15.
-
+
+ Dangers with multiple Main
+ modules.
hunk ./ghc/docs/users_guide/bugs.sgml 290
-
-GHC can warn about non-exhaustive or overlapping patterns, and usually does so correctly.
-But not always. It gets confused by string patterns, and by guards, and can then
-emit bogus warnings. The entire overlap-check code needs an overhaul really.
-
+ GHC does not insist that module Main
+ lives in a file called Main.hs. This is
+ useful if you want multiple versions of
+ Main. But there's a danger: when compiling
+ module Main (regardless of what file it
+ comes from), GHC looks for the interface
+ Main.hi; it uses this to get version
+ information from the last time it recompiled
+ Main. The trouble is that this
+ Main.hi may not correspond to the source
+ file being compiled.
hunk ./ghc/docs/users_guide/bugs.sgml 302
-
-
-Dangers with multiple Main modules.
-
-
- GHC does not insist that module Main lives in a file called Main.hs.
- This is useful if you want multiple versions of Main. But there's a danger: when
- compiling module Main (regardless of what file it comes from), GHC looks for
- the interface Main.hi; it uses this to get version information from the last
- time it recompiled Main. The trouble is that this Main.hi
- may not correspond to the source file being compiled.
-
-
- Solution: remove Main.hi first. A better solution would be for GHC to
- record the source-file filename in the interface file, or even an MD5 checksum.
-
-
+ Solution: remove Main.hi first. A
+ better solution would be for GHC to record the source-file
+ filename in the interface file, or even an MD5 checksum.
+
+
hunk ./ghc/docs/users_guide/bugs.sgml 308
+
+ GHCi does not respect the default
+ declaration in the module whose scope you are in. Instead,
+ for expressions typed at the command line, you always get the
+ default default-type behaviour; that is,
+ default(Int,Double).
hunk ./ghc/docs/users_guide/bugs.sgml 315
-
-GHCi does not respect the default declaration in the module whose
-scope you are in. Instead, for expressions typed at the command line, you always
-get the default default-type behaviour; that is, default(Int,Double).
-
-
-It would be better for GHCi to record what the default settings in each module are, and
-use those of the 'current' module (whatever that is).
-
+ It would be better for GHCi to record what the default
+ settings in each module are, and use those of the 'current'
+ module (whatever that is).
+
hunk ./ghc/docs/users_guide/bugs.sgml 320
-
-GHCi does not keep careful track of what instance declarations are 'in scope' if they
-come from other packages.
-Instead, all instance declarations that GHC has seen in other packages are all in scope
-everywhere, whether or not the module from that package is used by the command-line expression.
-
+
+ GHCi does not keep careful track of what instance
+ declarations are 'in scope' if they come from other packages.
+ Instead, all instance declarations that GHC has seen in other
+ packages are all in scope everywhere, whether or not the
+ module from that package is used by the command-line
+ expression.
+
hunk ./ghc/docs/users_guide/bugs.sgml 329
-
-GHC's inliner can be persuaded into non-termination using the standard way to encode
-recursion via a data type:
+
+ GHC's inliner can be persuaded into non-termination
+ using the standard way to encode recursion via a data type:
hunk ./ghc/docs/users_guide/bugs.sgml 341
-We have never found another class of programs, other than this contrived one, that makes GHC
-diverge, and fixing the problem would impose an extra overhead on every compilation. So the
-bug remains un-fixed. There is more background in
-
-Secrets of the GHC inliner.
-
-
-
hunk ./ghc/docs/users_guide/bugs.sgml 342
-
+ We have never found another class of programs, other
+ than this contrived one, that makes GHC diverge, and fixing
+ the problem would impose an extra overhead on every
+ compilation. So the bug remains un-fixed. There is more
+ background in
+ Secrets of the GHC inliner.
+
+
+
+
+
}