X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fusing.xml;h=a4c673cbe4965318e450b9ce4a5f82ba581312c5;hb=56aaa78a63ab27c40a6834ed28ff3f32d1ede214;hp=be8232244bcab976ae5db065ce986e3d010f73cb;hpb=1edc287a8817e76b6895a42c08dc4ab3ca162fac;p=ghc-hetmet.git diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml index be82322..a4c673c 100644 --- a/docs/users_guide/using.xml +++ b/docs/users_guide/using.xml @@ -1175,6 +1175,21 @@ foreign import "&f" f :: FunPtr t + : + + + Causes the compiler to emit a warning when a Prelude numeric + conversion converts a type T to the same type T; such calls + are probably no-ops and can be omitted. The functions checked for + are: toInteger, + toRational, + fromIntegral, + and realToFrac. + + + + + : @@ -1206,14 +1221,15 @@ foreign import "&f" f :: FunPtr t incomplete patterns, warning patterns, incomplete - Similarly for incomplete patterns, the function - g below will fail when applied to + Similarly for incomplete patterns, the functions + g and h below will fail when applied to non-empty lists, so the compiler will emit a warning about this when is enabled. g [] = 2 +h = \[] -> 2 This option isn't enabled by default because it can be