title: Haskell print statement
body: <p>I am writing in Haskell and want to print a statement in a function and also call another function and I dont know why this isn't working. Could someone possibly tell me what I'm doing wrong or provide a more logical solution?</p>
  
  <p>My error is:</p>
  
  <pre><code>Couldn't match expected type `[a0]' with actual type `IO ()'
  In the return type of a call of `putStrLn'
  In a stmt of a 'do' block: putStrLn "Missing closing bracket"
  In the expression:
    do { putStrLn "Missing closing bracket";
         evaluate_input }
  </code></pre>
  
  <p>The code:</p>
  
  <pre><code>    bracket_content [] 0 = []
  bracket_content (first:rest) counter 
      | is_open_bracket first  = first : bracket_content rest (counter + 1)
      | is_close_bracket first = first : bracket_content rest (counter - 1)
      | counter == 0 = []
      | otherwise = first : bracket_content rest counter
  bracket_content _ _ = do putStrLn "Missing closing bracket" --error here
                           evaluate_input
  
  evaluate_input :: IO ()
  evaluate_input = do
    putStrLn "Enter Expression or 'q' to exit calculator: "
    expression &lt;- getLine
    case expression of
      a:as -&gt; return a
    unless (expression == ['q']) $ evaluate_expression expression
   where evaluate_expression e  = do 
                                     putStrLn . show $ calculate e 
                                     evaluate_input
  </code></pre>