background preloader

Pandoc

Facebook Twitter

24 Days of Hackage: pandoc. Today I have the pleasure of sitting back and allowing Ron (aka latermuse) to run the show. Ron approached me almost immediately after I announced 24 Days of Hackage this year, and has produced a great post about document conversions in Haskell. So, without further ado, Ron - it’s over to you! Back in the days of yore, conversion between document types was nigh impossible for laymen. Apprentices were historically tasked with conversion but many inevitably failed due to absymal documentation and a lack of specialized tools. For charset conversion, we had iconv. For media conversion, we had ffmpeg. Pandoc quickly filled the void, providing a simple and painless tool for converting documents between many different formats. Through John McFarlane’s genius division of labor, Pandoc has separated the conversion of documents into readers and writers.

Pandoc can be used both as an executable or a library. First, let’s import the Pandoc text library. import Text.Pandoc. Mpastell / Pandoc filters. Pandoc - About pandoc. BlazeHtml - Home. BlazeHtml is a blazingly fast HTML combinator library for the Haskell programming language. It embeds HTML templates in Haskell code for optimal efficiency and composability. To get started, just cabal install blaze-html The project is aimed at those who seek to write web applications in Haskell – it integrates well with all Haskell web frameworks. The best way to get started with BlazeHtml is to have a look at our tutorial. Pretty fast – have a look at our benchmarksLightweight DSL syntaxEmbedded in HaskellEfficient Unicode supportSupports HTML 4 Strict and HTML 5Tool to create code from an HTML file The BlazeHtml API is considered stable, however, the implementation is still experimental.

If you are interested, all code is available on GitHub. CS240h: Functional Systems in Haskell. Haskell/Print version. Haskell Basics Getting set up Variables and functions Truth values Type basics Lists and tuples Type basics II Next steps Building vocabulary Simple input and output Elementary Haskell Recursion More about lists Folds, Scans, & Comprehension Type declarations Pattern matching Control structures More on functions Higher order functions Using GHCi effectively Intermediate Haskell Modules Standalone programs Indentation More on datatypes Other data structures Classes and types The Functor class Monads Understanding monads Maybe:List do Notation IO:State Additive monads (MonadPlus) Monad transformers Advanced Haskell Monoids Applicative Functors Arrow tutorial Understanding arrows Continuation passing style (CPS) Value recursion (MonadFix) Zippers Mutable objects Concurrency Fun with Types Polymorphism basics Existentially quantified types Advanced type classes Phantom types Generalised algebraic data-types (GADT) Datatype algebra Type constructors & Kinds Wider Theory Denotational semantics Equational reasoning Program derivation Introduction .