Pandoc is a universal markup converter written in Haskell that can convert between numerous markup formats such as Markdown, HTML, LaTeX, and more. It uses a neutral Haskell data type representation of documents and applies parsers to input documents to convert them to this representation before writers convert it to the target format. Pandoc's use of Haskell allows for type safety and leverages libraries like Text.Parsec to parse documents in a flexible way by treating them as structured lists.