X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fbugs.xml;h=9b167ccbc912e090b37f9543e96cedf00c756208;hb=1bf40a4b38180b8b1c1bdaf4919bc327d5b27abe;hp=ead62535777ade8d3d22875dd8d654722e0648cd;hpb=973ea68765061854376f1ac579a6071cb403635c;p=ghc-hetmet.git diff --git a/docs/users_guide/bugs.xml b/docs/users_guide/bugs.xml index ead6253..9b167cc 100644 --- a/docs/users_guide/bugs.xml +++ b/docs/users_guide/bugs.xml @@ -5,7 +5,7 @@ Haskell 98 vs. Glasgow Haskell: language non-compliance - + GHC vs the Haskell 98 language Haskell 98 language vs GHC @@ -19,18 +19,12 @@ Divergence from Haskell 98 - - + + Lexical syntax - - - - The Haskell report specifies that programs may be - written using Unicode. GHC only accepts the ISO-8859-1 - character set at the moment. - + Certain lexical rules regarding qualified identifiers are slightly different in GHC compared to the Haskell @@ -42,10 +36,10 @@ - + Context-free syntax - + GHC is a little less strict about the layout rule when used @@ -104,14 +98,28 @@ main = do args <- getArgs GHC's typechecker makes all pattern bindings monomorphic by default; this behaviour can be disabled with - . See -XNoMonoPatBinds. See . - + Module system and interface files - - None known. + + GHC requires the use of hs-boot + files to cut the recursive loops among mutually recursive modules + as described in . This more of an infelicity + than a bug: the Haskell Report says + (Section 5.7) "Depending on the Haskell + implementation used, separate compilation of mutually + recursive modules may require that imported modules contain + additional information so that they may be referenced before + they are compiled. Explicit type signatures for all exported + values may be necessary to deal with mutual recursion. The + precise details of separate compilation are not defined by + this Report." + + + @@ -133,7 +141,7 @@ checking for duplicates. The reason for this is efficiency, pure and simple. - + @@ -183,6 +191,22 @@ checking for duplicates. The reason for this is efficiency, pure and simple. alphabetic by isAlpha. + + + hGetContents + + + Lazy I/O throws an exception if an error is + encountered, in contrast to the Haskell 98 spec which + requires that errors are discarded (see Section 21.2.2 + of the Haskell 98 report). The exception thrown is + the usual IO exception that would be thrown if the + failing IO operation was performed in the IO monad, and can + be caught by System.IO.Error.catch + or Control.Exception.catch. + + + @@ -227,7 +251,7 @@ checking for duplicates. The reason for this is efficiency, pure and simple. the Int type. The fromIntegerfromInteger - function (and hence + function (and hence also fromIntegralfromIntegral ) is a special case when converting to Int. The value of @@ -241,7 +265,7 @@ checking for duplicates. The reason for this is efficiency, pure and simple. Negative literals, such as -3, are - specified by (a careful reading of) the Haskell Report as + specified by (a careful reading of) the Haskell Report as meaning Prelude.negate (Prelude.fromInteger 3). So -2147483648 means negate (fromInteger 2147483648). Since fromInteger takes the lower 32 bits of the representation, @@ -278,8 +302,26 @@ checking for duplicates. The reason for this is efficiency, pure and simple. - + + + + Divergence from the FFI specification + + + + hs_init() not allowed + after hs_exit() + + The FFI spec requires the implementation to support + re-initialising itself after being shut down + with hs_exit(), but GHC does not + currently support that. + + + + + @@ -306,7 +348,7 @@ checking for duplicates. The reason for this is efficiency, pure and simple. - GHC does not allow you to have a data type with a context + GHC does not allow you to have a data type with a context that mentions type variables that are not data type parameters. For example: @@ -327,10 +369,10 @@ checking for duplicates. The reason for this is efficiency, pure and simple. using the standard way to encode recursion via a data type: data U = MkU (U -> Bool) - + russel :: U -> Bool russel u@(MkU p) = not $ p u - + x :: Bool x = russel (MkU russel) @@ -340,7 +382,7 @@ checking for duplicates. The reason for this is efficiency, pure and simple. the problem would impose an extra overhead on every compilation. So the bug remains un-fixed. There is more background in + url="http://research.microsoft.com/~simonpj/Papers/inlining/"> Secrets of the GHC inliner. @@ -372,7 +414,7 @@ checking for duplicates. The reason for this is efficiency, pure and simple. module (whatever that is). - + On Windows, there's a GNU ld/BFD bug whereby it emits bogus PE object files that have more than 0xffff relocations. When GHCi tries to load a package affected by this @@ -397,7 +439,6 @@ Loading package javavm ... linking ... WARNING: Overflown relocation field (# re