Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
11 lines (8 sloc) 214 Bytes
module SafeHello where
import MonadHandle
import System.IO (IOMode(..))
safeHello :: MonadHandle m h => FilePath -> m ()
safeHello path = do
h <- openFile path WriteMode
hPutStrLn h "hello world"
hClose h