From 90cdb78726795320190f5dac8e82c4f0a068014a Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 27 Feb 2002 10:29:12 +0000 Subject: [PATCH] [project @ 2002-02-27 10:26:13 by simonmar] Expand on the behaviour of fromIntegral a bit. --- ghc/docs/users_guide/vs_haskell.sgml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ghc/docs/users_guide/vs_haskell.sgml b/ghc/docs/users_guide/vs_haskell.sgml index 5ad9f98..87c6b9c 100644 --- a/ghc/docs/users_guide/vs_haskell.sgml +++ b/ghc/docs/users_guide/vs_haskell.sgml @@ -220,6 +220,15 @@ main = print (array (1,1) [(1,2), (1,3)]) arithmetic). This behaviour was chosen so that for example writing 0xffffffff :: Int preserves the bit-pattern in the resulting Int. + + The fromIntegral function also + preserves bit-patterns when converting between the sized + integral types (Int8, + Int16, Int32, + Int64 and the unsigned + Word variants), see and . + -- 1.7.10.4