title: Extracting x from (Just x) in a Maybe
body: <p>Super simple I'm sure, but I can't seem to find the answer.  I call a function that returns <code>Maybe x</code> and I want to see <code>x</code>.  How to I extract <code>x</code> from my <code>Just x</code> response?</p>
  
  <pre><code>seeMyVal :: IO ()
  seeMyVal = do
     if getVal == Nothing 
     then do
         putStrLn "Nothing to see here"
     else do
         putStrLn getVal -- what do I have to change in this line?
  
  getVal :: (Maybe String)
  getVal = Just "Yes, I'm real!"
  </code></pre>
  
  <p>This throws the error:</p>
  
  <pre><code>Couldn't match type ‘Maybe String’ with ‘[Char]’
  Expected type: String
    Actual type: Maybe String
  In the first argument of ‘putStrLn’, namely ‘getVal’
  In a stmt of a 'do' block: putStrLn getVal
  </code></pre>