ghc: use resource