In this post, I am going to explain how to read contents of a file. First we need to open a file, Haskell provides two functions openFile, openBinaryFile to get a file handle. &lsquo… Read More
Prelude System.IO> :t hPrinthPrint :: Show a => Handle -> a -> IO ()Observe the signature of hPrint, it takes a Handle, variable ‘a’, which derives Show class and wri… Read More