Support code for Haskell resource limits.