packages feed

cookbook-0.1.0.0: Cookbook/IO.hs

module Cookbook.IO(filelines) where
import System.IO
import System.Environment

-- | Returns the lines of a file, wrapped in an IO.
filelines :: String -> IO ([String])
filelines x = do
  y <- openFile x ReadMode
  yc <- hGetContents y
  return (lines yc)