{- Copyright (c) 2011 Robert Henderson
This source file is distributed under the terms of a BSD3-style
license, which can be found in the file LICENSE at the root of
this package. -}

-- | Extends "System.IO"
--
module System.IO.Rosso1
    (module System.IO

    ,readFileStrict

    ) where

------------------------------------------------------
import System.IO
import Control.DeepSeq


-- | Like 'readFile', but reads the entire contents of the file into
-- the string, and then closes the file, before the computation
-- completes.
--
readFileStrict :: FilePath -> IO String
readFileStrict file = do str <- readFile file
                         deepseq str $ return str


------------------------------------------------------
{- UNIT TESTS

-}