From: simonpj Date: Thu, 22 Mar 2001 11:00:54 +0000 (+0000) Subject: [project @ 2001-03-22 11:00:54 by simonpj] X-Git-Tag: Approximately_9120_patches~2344 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=2d4a00233762ff9b5944e4bd0451d9dc6fe974a5;p=ghc-hetmet.git [project @ 2001-03-22 11:00:54 by simonpj] Add a bit more info about -fno-implicit-prelude --- diff --git a/ghc/docs/users_guide/glasgow_exts.sgml b/ghc/docs/users_guide/glasgow_exts.sgml index 8589b04..951b59c 100644 --- a/ghc/docs/users_guide/glasgow_exts.sgml +++ b/ghc/docs/users_guide/glasgow_exts.sgml @@ -240,8 +240,8 @@ program), you may wish to check if there are libraries that provide a "Prelude.fromInteger 1", which is what the Haskell Report specifies. So the flag causes the - following pieces of built-in syntax to refer to whatever - is in scope, not the Prelude versions: + following pieces of built-in syntax to refer to whatever + is in scope, not the Prelude versions: @@ -260,13 +260,25 @@ program), you may wish to check if there are libraries that provide a In an n+k pattern, the standard Prelude - Ord class is used for comparison, + Ord class is still used for comparison, but the necessary subtraction uses whatever "(-)" is in scope (not "Prelude.(-)"). + Note: Negative literals, such as -3, are + specified by (a careful reading of) the Haskell Report as + meaning Prelude.negate (Prelude.fromInteger 3). + However, GHC deviates from this slightly, and treats them as meaning + fromInteger (-3). One particular effect of this + slightly-non-standard reading is that there is no difficulty with + the literal -2147483648 at type Int; + it means fromInteger (-2147483648). The strict interpretation + would be negate (fromInteger 21474836483), + and the call to fromInteger would overflow (at type Int, remember). + +