clearCallback :: Parser -> Callback a -> IO ()
clearCallback parser which = do
  case which of
    CallbackBeginDocument -> do
      writeIORef (parserBeginDocumentCallback parser) Nothing
    CallbackEndDocument -> do
      writeIORef (parserEndDocumentCallback parser) Nothing
    CallbackBeginElement -> do
      writeIORef (parserBeginElementCallback parser) Nothing
    CallbackEndElement -> do
      writeIORef (parserEndElementCallback parser) Nothing
    CallbackCharacters -> do
      writeIORef (parserCharactersCallback parser) Nothing
    CallbackComment -> do
      writeIORef (parserCommentCallback parser) Nothing
    CallbackInstruction -> do
      writeIORef (parserInstructionCallback parser) Nothing
    CallbackDoctype -> do
      writeIORef (parserDoctypeCallback parser) Nothing
clearCallback :: Parser -> Callback a -> IO ()
clearCallback parser which = do
  case which of
    CallbackBeginDocument -> do
      writeIORef (parserBeginDocumentCallback parser) Nothing
    CallbackEndDocument -> do
      writeIORef (parserEndDocumentCallback parser) Nothing
    CallbackBeginElement -> do
      writeIORef (parserBeginElementCallback parser) Nothing
    CallbackEndElement -> do
      writeIORef (parserEndElementCallback parser) Nothing
    CallbackCharacters -> do
      writeIORef (parserCharactersCallback parser) Nothing
    CallbackComment -> do
      writeIORef (parserCommentCallback parser) Nothing
    CallbackInstruction -> do
      writeIORef (parserInstructionCallback parser) Nothing
    CallbackDoctype -> do
      writeIORef (parserDoctypeCallback parser) Nothing
clearCallback parser which = do
  case which of
    CallbackBeginDocument -> do
      writeIORef (parserBeginDocumentCallback parser) Nothing
    CallbackEndDocument -> do
      writeIORef (parserEndDocumentCallback parser) Nothing
    CallbackBeginElement -> do
      writeIORef (parserBeginElementCallback parser) Nothing
    CallbackEndElement -> do
      writeIORef (parserEndElementCallback parser) Nothing
    CallbackCharacters -> do
      writeIORef (parserCharactersCallback parser) Nothing
    CallbackComment -> do
      writeIORef (parserCommentCallback parser) Nothing
    CallbackInstruction -> do
      writeIORef (parserInstructionCallback parser) Nothing
    CallbackDoctype -> do
      writeIORef (parserDoctypeCallback parser) Nothing