summaryrefslogtreecommitdiff
path: root/Pancake
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2018-02-21 18:55:51 +0300
committerdefanor <defanor@uberspace.net>2018-02-21 18:55:51 +0300
commit9939aa23bb11b22be9e570c972be6a898b9df8eb (patch)
tree07bc44208b4337b91cc64ec96a3e422b888cd604 /Pancake
parent99cd9c84abf3c52970981499875b402d5fb68085 (diff)
Use Redland bindings instead of rdf4h
It's faster, includes a proper triple store with querying, and generally should be more useful.
Diffstat (limited to 'Pancake')
-rw-r--r--Pancake/Reading.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/Pancake/Reading.hs b/Pancake/Reading.hs
index 3a83e46..0124ec9 100644
--- a/Pancake/Reading.hs
+++ b/Pancake/Reading.hs
@@ -53,7 +53,6 @@ import Data.Version
import qualified Data.Map as M
import Control.Monad.IO.Class
import System.Directory
-import Control.Concurrent.STM.TVar
import System.Timeout
import Text.Pandoc.Readers.Plain
@@ -203,8 +202,6 @@ pEmacsMode = do
readDoc :: MonadIO m
=> Config
-- ^ Configuration.
- -> TVar (M.Map String String)
- -- ^ RDF cache
-> BS.ByteString
-- ^ Raw document data.
-> Maybe String
@@ -213,7 +210,7 @@ readDoc :: MonadIO m
-- ^ Document URI.
-> m (Either P.PandocError P.Pandoc)
-- ^ A parsed document.
-readDoc c rdfc out dt uri = do
+readDoc c out dt uri = do
term <- liftIO setupTermFromEnv
let (reader, exts) = either (const plain) id $
maybe (Left "no type suggestions") byExtension dt
@@ -251,7 +248,7 @@ readDoc c rdfc out dt uri = do
html = P.getReader "html"
plain = (P.TextReader . const $ readPlain, P.emptyExtensions)
gopher = pure (P.TextReader . const $ readGopher, P.emptyExtensions)
- rdf = ( P.TextReader . const $ readRDF rdfc uri retrieveRelative
+ rdf = ( P.TextReader . const $ readRDF uri retrieveRelative
, P.emptyExtensions)
byExtension' ext = byExtension $ dropWhile (== '.') ext
byExtension "md" = P.getReader "markdown"