[commit: ghc] master: Fix sign error in kelvinToC. (b31c721)

git at git.haskell.org git at git.haskell.org
Tue Jan 2 20:55:29 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/b31c7214b7ccf31b6a78faac1a3cc5c39cdff56d/ghc

>---------------------------------------------------------------

commit b31c7214b7ccf31b6a78faac1a3cc5c39cdff56d
Author: Galen Huntington <galenhuntington at gmail.com>
Date:   Sun Dec 31 23:43:15 2017 -0800

    Fix sign error in kelvinToC.


>---------------------------------------------------------------

b31c7214b7ccf31b6a78faac1a3cc5c39cdff56d
 docs/users_guide/glasgow_exts.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst
index 201aa77..03ea986 100644
--- a/docs/users_guide/glasgow_exts.rst
+++ b/docs/users_guide/glasgow_exts.rst
@@ -12878,7 +12878,7 @@ GHC offers a helping hand here, doing all of this for you. For every use
 of ``assert`` in the user's source: ::
 
     kelvinToC :: Double -> Double
-    kelvinToC k = assert (k >= 0.0) (k+273.15)
+    kelvinToC k = assert (k >= 0.0) (k-273.15)
 
 GHC will rewrite this to also include the source location where the
 assertion was made, ::



More information about the ghc-commits mailing list