Sorry I am being a pain, just trying to understand.
the error is:
Function main has the type [(Prelude.IO ())] instead of IO ().
and this is my code
module Main(main) where
type Foo = [String]
addToTable :: String -> Foo -> Foo
addToTable newEntry currentTable = newEntry : currentTable
printTable :: Foo -> [IO ()]
printTable [] = []
printTable (x:xs) = putStrLn x : printTable xs
main :: [IO ()]
main = do
let tab1 = addToTable "stuff" tab1
let tab1 = addToTable "hi" tab1
let tab1 = addToTable "hello" tab1
printTable tab1