git.iko.soy/typeable/pandoc
on 2.0.0.1 help sign in
typeable/pandoc/pandoc.hs
38 lines 1.3 kB history raw
1{-
2Copyright (C) 2006-2017 John MacFarlane <jgm@berkeley.edu>
4This program is free software; you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation; either version 2 of the License, or
7(at your option) any later version.
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
14You should have received a copy of the GNU General Public License
15along with this program; if not, write to the Free Software
16Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17-}
19{- |
20 Module : Main
21 Copyright : Copyright (C) 2006-2017 John MacFarlane
22 License : GNU GPL, version 2 or above
24 Maintainer : John MacFarlane <jgm@berkeley@edu>
25 Stability : alpha
26 Portability : portable
28Parses command-line options and calls the appropriate readers and
29writers.
30-}
31module Main where
32import qualified Control.Exception as E
33import Text.Pandoc.App (convertWithOpts, defaultOpts, options, parseOptions)
34import Text.Pandoc.Error (handleError)
36main :: IO ()
37main = E.catch (parseOptions options defaultOpts >>= convertWithOpts)
38 (handleError . Left)