[commit: packages/unix] master: Fix a type defaulting warning (c1983d5)

git at git.haskell.org git at git.haskell.org
Sat Oct 12 23:54:00 UTC 2013


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

On branch  : master
Link       : http://git.haskell.org/packages/unix.git/commitdiff/c1983d5ad4a0c4c5e7ae7e3e7108e42df374dd70

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

commit c1983d5ad4a0c4c5e7ae7e3e7108e42df374dd70
Author: Bryan O'Sullivan <bos at serpentine.com>
Date:   Sat Oct 12 16:51:14 2013 -0700

    Fix a type defaulting warning
    
    (And a small matter of using != instead of /= -- how embarrassing!)


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

c1983d5ad4a0c4c5e7ae7e3e7108e42df374dd70
 System/Posix/Resource.hsc |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/System/Posix/Resource.hsc b/System/Posix/Resource.hsc
index 58cff6f..23d2ad4 100644
--- a/System/Posix/Resource.hsc
+++ b/System/Posix/Resource.hsc
@@ -97,11 +97,11 @@ unpackRLimit :: CRLim -> ResourceLimit
 unpackRLimit (#const RLIM_INFINITY)  = ResourceLimitInfinity
 unpackRLimit other
 #if defined(RLIM_SAVED_MAX)
-    | (#const RLIM_SAVED_MAX) != (#const RLIM_INFINITY) &&
+    | ((#const RLIM_SAVED_MAX) :: CRLim) /= (#const RLIM_INFINITY) &&
       other == (#const RLIM_SAVED_MAX) = ResourceLimitUnknown
 #endif
 #if defined(RLIM_SAVED_CUR)
-    | (#const RLIM_SAVED_CUR) != (#const RLIM_INFINITY) &&
+    | ((#const RLIM_SAVED_CUR) :: CRLim) /= (#const RLIM_INFINITY) &&
       other == (#const RLIM_SAVED_CUR) = ResourceLimitUnknown
 #endif
     | otherwise = ResourceLimit (fromIntegral other)



More information about the ghc-commits mailing list