Revert "Text.Pandoc.Data: ensure it compiles even without embed_data_files."

This reverts commit 453970c6b3.
This commit is contained in:
John MacFarlane 2017-03-26 20:41:35 +02:00
parent 358dfba8f4
commit b7782cf8d3

View file

@ -1,15 +1,11 @@
{-# LANGUAGE CPP #-}
#ifdef EMBED_DATA_FILES
{-# LANGUAGE TemplateHaskell #-}
#endif
module Text.Pandoc.Data (dataFiles) where
import System.FilePath (FilePath, splitDirectories)
import qualified Data.ByteString as B
import qualified System.FilePath.Posix as Posix
#ifdef EMBED_DATA_FILES
import Data.FileEmbed
#endif
import qualified Data.ByteString as B
import System.FilePath (splitDirectories)
import qualified System.FilePath.Posix as Posix
-- We ensure that the data files are stored using Posix
-- path separators (/), even on Windows.
@ -18,8 +14,4 @@ dataFiles = map (\(fp, contents) ->
(Posix.joinPath (splitDirectories fp), contents)) dataFiles'
dataFiles' :: [(FilePath, B.ByteString)]
#ifdef EMBED_DATA_FILES
dataFiles' = ("MANUAL.txt", $(embedFile "MANUAL.txt")) : $(embedDir "data")
#else
dataFiles' = error "dataFiles is only defined when embed_data_files flag set"
#endif