pandoc/pandoc.hs

23 lines
650 B
Haskell
Raw Normal View History

{-# LANGUAGE NoImplicitPrelude #-}
{- |
Module : Main
Copyright : Copyright (C) 2006-2020 John MacFarlane
License : GNU GPL, version 2 or above
Maintainer : John MacFarlane <jgm@berkeley@edu>
Stability : alpha
Portability : portable
Parses command-line options and calls the appropriate readers and
writers.
-}
module Main where
import Prelude
import qualified Control.Exception as E
2017-06-01 15:09:38 +02:00
import Text.Pandoc.App (convertWithOpts, defaultOpts, options, parseOptions)
2017-10-28 05:39:20 +02:00
import Text.Pandoc.Error (handleError)
2015-02-18 20:57:30 +01:00
main :: IO ()
main = E.catch (parseOptions options defaultOpts >>= convertWithOpts)
2017-10-28 05:58:54 +02:00
(handleError . Left)