case runOperationOn someData of Just res -> putStrLn ("The operation was successful: " ++ res) Nothing -> putStrLn "The operation failed!"