Class: have pure instance of openURL throw an error, for now.
Later we may want to include a map of URLs and mime type, bytestring
pairs in pure state to serve as a fake internet.
commit994d43117231af8f9825d4df3dd3f2f6af74f8af
authorJohn MacFarlane <jgm@berkeley.edu>
dateMon 12 Dec 2016, 14:15 (10 years ago)
parent6aff97e
src/Text/Pandoc/Class.hs+1−1
@@ -396,7 +396,7 @@ instance PandocMonad PandocPure where
396396 modifyPureState $ \st -> st { stUniqStore = us }
397397 return u
398398 _ -> M.fail "uniq store ran out of elements"
399− openURL _ = undefined -- TODO
399+ openURL _ = throwError $ PandocSomeError "Cannot open URL in PandocPure"
400400 readFileLazy fp = do
401401 fps <- getsPureState stFiles
402402 case infoFileContents <$> getFileInfo fp fps of