diff options
author | Bryan O'Sullivan <bos@serpentine.com> | 2013-10-12 16:45:11 -0700 |
---|---|---|
committer | Bryan O'Sullivan <bos@serpentine.com> | 2013-10-12 16:45:11 -0700 |
commit | c8dc5f5c8b9247abd32069b0c08ef5655f81161a (patch) | |
tree | f7dac0f6f019ab0239d92695767ecfc4efd59aaf /System/Posix/Resource.hsc | |
parent | e968172cb0c9f4fc653c775faf3ecb661f5b1948 (diff) |
Drop trailing whitespace
Diffstat (limited to 'System/Posix/Resource.hsc')
-rw-r--r-- | System/Posix/Resource.hsc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/System/Posix/Resource.hsc b/System/Posix/Resource.hsc index 165bed4..a0d0d35 100644 --- a/System/Posix/Resource.hsc +++ b/System/Posix/Resource.hsc @@ -6,7 +6,7 @@ -- Module : System.Posix.Resource -- Copyright : (c) The University of Glasgow 2003 -- License : BSD-style (see the file libraries/base/LICENSE) --- +-- -- Maintainer : libraries@haskell.org -- Stability : provisional -- Portability : non-portable (requires POSIX) @@ -68,7 +68,7 @@ getResourceLimit res = do c_getrlimit (packResource res) p_rlimit soft <- (#peek struct rlimit, rlim_cur) p_rlimit hard <- (#peek struct rlimit, rlim_max) p_rlimit - return (ResourceLimits { + return (ResourceLimits { softLimit = unpackRLimit soft, hardLimit = unpackRLimit hard }) @@ -125,7 +125,7 @@ main = do zipWithM_ (\r n -> setResourceLimit r ResourceLimits{ hardLimit = ResourceLimit n, softLimit = ResourceLimit n }) - allResources [1..] + allResources [1..] showAll mapM_ (\r -> setResourceLimit r ResourceLimits{ hardLimit = ResourceLimit 1, @@ -134,20 +134,20 @@ main = do -- should fail -showAll = +showAll = mapM_ (\r -> getResourceLimit r >>= (putStrLn . showRLims)) allResources allResources = [ResourceCoreFileSize, ResourceCPUTime, ResourceDataSize, ResourceFileSize, ResourceOpenFiles, ResourceStackSize #ifdef RLIMIT_AS - , ResourceTotalMemory + , ResourceTotalMemory #endif ] showRLims ResourceLimits{hardLimit=h,softLimit=s} = "hard: " ++ showRLim h ++ ", soft: " ++ showRLim s - + showRLim ResourceLimitInfinity = "infinity" showRLim ResourceLimitUnknown = "unknown" showRLim (ResourceLimit other) = show other |