Haskell Let/In in main function
haskell
Solution
When you use let binding in a do block, don't use the `in` keyword.
main :: IO()
main = do
inFile <- openFile "file.txt" ReadMode
content <- hGetContents inFile
let someValue = someFunction(content)
print(anotherFunction(someValue))
print(anotherFunction2(someValue))
hClose inFile
Problem
My code: ``` import System.IO main :: IO() main = do inFile <- openFile "file.txt" ReadMode content <- hGetContents inFile let someValue = someFunction(content) in print(anotherFunction(someValue)) print(anotherFunction2(someValue)) hClose inFile ``` My error: ``` - Type error in application *** Expression : print (anotherFunction2(someValue)) *** Term : print *** Type : e -> IO () *** Does not match : a -> b -> c -> d ``` I need to print two or more lines with functions that require "someValue". How I can fix it?