"Fossies" - the Fresh Open Source Software Archive

Member "pandoc-2.7.3/src/Text/Pandoc.hs" (12 Jun 2019, 2237 Bytes) of package /linux/www/pandoc-2.7.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Haskell source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "Pandoc.hs": 2.6_vs_2.7.

    1 {-# LANGUAGE FlexibleInstances   #-}
    2 {-# LANGUAGE GADTs               #-}
    3 {-# LANGUAGE ScopedTypeVariables #-}
    4 {- |
    5    Module      : Text.Pandoc
    6    Copyright   : Copyright (C) 2006-2019 John MacFarlane
    7    License     : GNU GPL, version 2 or above
    8 
    9    Maintainer  : John MacFarlane <jgm@berkeley.edu>
   10    Stability   : alpha
   11    Portability : portable
   12 
   13 This helper module exports the main writers, readers, and data
   14 structure definitions from the Pandoc libraries.
   15 
   16 A typical application will chain together a reader and a writer
   17 to convert strings from one format to another.  For example, the
   18 following simple program will act as a filter converting markdown
   19 fragments to reStructuredText, using reference-style links instead of
   20 inline links:
   21 
   22 > module Main where
   23 > import Text.Pandoc
   24 > import Data.Text (Text)
   25 > import qualified Data.Text.IO as T
   26 >
   27 > mdToRST :: Text -> IO Text
   28 > mdToRST txt = runIOorExplode $
   29 >   readMarkdown def txt
   30 >   >>= writeRST def{ writerReferenceLinks = True }
   31 
   32 >
   33 > main :: IO ()
   34 > main = do
   35 >   T.getContents >>= mdToRST >>= T.putStrLn
   36 
   37 -}
   38 
   39 module Text.Pandoc
   40                (
   41                -- * Definitions
   42                module Text.Pandoc.Definition
   43                -- * Generics
   44                , module Text.Pandoc.Generic
   45                -- * Options
   46                , module Text.Pandoc.Options
   47                -- * Logging
   48                , module Text.Pandoc.Logging
   49                -- * Typeclass
   50                , module Text.Pandoc.Class
   51                -- * Error handling
   52                , module Text.Pandoc.Error
   53                -- * Readers: converting /to/ Pandoc format
   54                , module Text.Pandoc.Readers
   55                -- * Writers: converting /from/ Pandoc format
   56                , module Text.Pandoc.Writers
   57                -- * Rendering templates and default templates
   58                , module Text.Pandoc.Templates
   59                -- * Miscellaneous
   60                , pandocVersion
   61              ) where
   62 
   63 import Text.Pandoc.Class
   64 import Text.Pandoc.Definition
   65 import Text.Pandoc.Error
   66 import Text.Pandoc.Generic
   67 import Text.Pandoc.Logging
   68 import Text.Pandoc.Options
   69 import Text.Pandoc.Readers
   70 import Text.Pandoc.Shared (pandocVersion)
   71 import Text.Pandoc.Templates
   72 import Text.Pandoc.Writers