aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-12-02 22:42:00 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-12-02 22:42:00 +0000
commit95c16bfa3b6e598bf7101c9915dac2ca62fb7889 (patch)
tree32ef66f0f3f584fb3e924c206e57c466eee41930
parent42ba781b3dcb15a3a8fd4169fa03eeb316f05125 (diff)
downloadpandoc-95c16bfa3b6e598bf7101c9915dac2ca62fb7889.tar.gz
Moved failUnlessLHS to Text.Pandoc.Shared.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1498 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r--Text/Pandoc/Readers/Markdown.hs6
-rw-r--r--Text/Pandoc/Shared.hs7
2 files changed, 7 insertions, 6 deletions
diff --git a/Text/Pandoc/Readers/Markdown.hs b/Text/Pandoc/Readers/Markdown.hs
index b2e0928c9..a6fe145c7 100644
--- a/Text/Pandoc/Readers/Markdown.hs
+++ b/Text/Pandoc/Readers/Markdown.hs
@@ -103,12 +103,6 @@ failUnlessSmart = do
state <- getState
if stateSmart state then return () else fail "Smart typography feature"
--- | Fail unless we're in literate haskell mode.
-failUnlessLHS :: GenParser tok ParserState ()
-failUnlessLHS = do
- state <- getState
- if stateLiterateHaskell state then return () else fail "Literate haskell feature"
-
-- | Parse a sequence of inline elements between square brackets,
-- including inlines between balanced pairs of square brackets.
inlinesInBalancedBrackets :: GenParser Char ParserState Inline
diff --git a/Text/Pandoc/Shared.hs b/Text/Pandoc/Shared.hs
index 0d137e9a9..799c35e0f 100644
--- a/Text/Pandoc/Shared.hs
+++ b/Text/Pandoc/Shared.hs
@@ -71,6 +71,7 @@ module Text.Pandoc.Shared (
withHorizDisplacement,
nullBlock,
failIfStrict,
+ failUnlessLHS,
escaped,
anyOrderedListMarker,
orderedListMarker,
@@ -489,6 +490,12 @@ failIfStrict = do
state <- getState
if stateStrict state then fail "strict mode" else return ()
+-- | Fail unless we're in literate haskell mode.
+failUnlessLHS :: GenParser tok ParserState ()
+failUnlessLHS = do
+ state <- getState
+ if stateLiterateHaskell state then return () else fail "Literate haskell feature"
+
-- | Parses backslash, then applies character parser.
escaped :: GenParser Char st Char -- ^ Parser for character to escape
-> GenParser Char st Inline