git.iko.soy/typeable/pandoc
on rc/test help sign in
typeable/pandoc/app/pandoc.hs
20 lines 600 B history raw
1{- |
2 Module : Main
3 Copyright : Copyright (C) 2006-2021 John MacFarlane
4 License : GNU GPL, version 2 or above
6 Maintainer : John MacFarlane <jgm@berkeley@edu>
7 Stability : alpha
8 Portability : portable
10Parses command-line options and calls the appropriate readers and
11writers.
12-}
13module Main where
14import qualified Control.Exception as E
15import Text.Pandoc.App (convertWithOpts, defaultOpts, options, parseOptions)
16import Text.Pandoc.Error (handleError)
18main :: IO ()
19main = E.catch (parseOptions options defaultOpts >>= convertWithOpts)
20 (handleError . Left)