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