Reputation: 13
I have a putStrLn that is seeing a function on a following line and therefore not being compiled properly.
if director == "" then
putStrLn "Please enter a directors name"
startFunctional 5 userName database --This line is seen as an argument for the putStrLn
else do
*etc*
I have tried to use brackets to isolate the string, but this throws the same error.
Error message:
The function `putStrLn' is applied to five arguments, but its type `String -> IO ()' has only one
Upvotes: 1
Views: 297
Reputation: 3428
Is it possible that you're missing a do
block?
if director == ""
then do
putStrLn "Please enter a directors name"
startFunctional 5 userName database
else do
*etc*
Also, try to align the then
and else
keywords of an if
block.
Upvotes: 6