lastB :: IO (Maybe Hash)
lastB = do
  outer <- lastBlockResult
  case outer of
    Left _ -> return Nothing
    Right out ->
      case HM.lookup "hash" out of
        Nothing -> return Nothing
        Just p -> return $ readText p
lastB :: IO (Maybe Hash)
lastB = do
  outer <- lastBlockResult
  case outer of
    Left _ -> return Nothing
    Right out ->
      case HM.lookup "hash" out of
        Nothing -> return Nothing
        Just p -> return $ readText p
lastB = do
  outer <- lastBlockResult
  case outer of
    Left _ -> return Nothing
    Right out ->
      case HM.lookup "hash" out of
        Nothing -> return Nothing
        Just p -> return $ readText p