summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Shared.hs
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-12-31 01:11:23 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-12-31 01:11:23 +0000
commit9eb435d3c138e6ff9d057f7349a9d87d6a1975bc (patch)
treebb2e2bfc5c12cb73bfb9990e73e4d8ba43fdfe46 /src/Text/Pandoc/Shared.hs
parentae44c7297f5ce12a3f1acd8c44efe11870805c0c (diff)
Removed TH module; refactored LaTeXMathML not to use TH.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1692 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Shared.hs')
-rw-r--r--src/Text/Pandoc/Shared.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs
index 868edc2c7..e913d5d0b 100644
--- a/src/Text/Pandoc/Shared.hs
+++ b/src/Text/Pandoc/Shared.hs
@@ -104,7 +104,8 @@ module Text.Pandoc.Shared (
WriterOptions (..),
defaultWriterOptions,
-- * File handling
- inDirectory
+ inDirectory,
+ readDataFile
) where
import Text.Pandoc.Definition
@@ -122,6 +123,7 @@ import System.IO.UTF8
import Data.Generics
import qualified Control.Monad.State as S
import Control.Monad (join)
+import Paths_pandoc (getDataFileName)
--
-- List processing
@@ -1030,3 +1032,7 @@ inDirectory path action = do
result <- action
setCurrentDirectory oldDir
return result
+
+-- | Read file from the Cabal data directory.
+readDataFile :: FilePath -> IO String
+readDataFile fname = getDataFileName fname >>= readFile