git.iko.soy/typeable/pandoc
on master help sign in
Moved failUnlessLHS to Text.Pandoc.Shared.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1498 788f1e2b-df1e-0410-8736-df70ead52e1b

commit95c16bfa3b6e598bf7101c9915dac2ca62fb7889 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateTue 2 Dec 2008, 22:42 (18 years ago) parent42ba781
2 files changed+7−6
Text/Pandoc/Readers/Markdown.hs−6 Text/Pandoc/Shared.hs+7
Text/Pandoc/Readers/Markdown.hs−6
@@ -103,12 +103,6 @@ failUnlessSmart = do
103103 state <- getState
104104 if stateSmart state then return () else fail "Smart typography feature"
105105
106−-- | Fail unless we're in literate haskell mode.
107−failUnlessLHS :: GenParser tok ParserState ()
108−failUnlessLHS = do
109− state <- getState
110− if stateLiterateHaskell state then return () else fail "Literate haskell feature"
111−
112106-- | Parse a sequence of inline elements between square brackets,
113107-- including inlines between balanced pairs of square brackets.
114108inlinesInBalancedBrackets :: GenParser Char ParserState Inline
Text/Pandoc/Shared.hs+7
@@ -71,6 +71,7 @@ module Text.Pandoc.Shared (
7171 withHorizDisplacement,
7272 nullBlock,
7373 failIfStrict,
74+ failUnlessLHS,
7475 escaped,
7576 anyOrderedListMarker,
7677 orderedListMarker,
@@ -489,6 +490,12 @@ failIfStrict = do
489490 state <- getState
490491 if stateStrict state then fail "strict mode" else return ()
491492
493+-- | Fail unless we're in literate haskell mode.
494+failUnlessLHS :: GenParser tok ParserState ()
495+failUnlessLHS = do
496+ state <- getState
497+ if stateLiterateHaskell state then return () else fail "Literate haskell feature"
498+
492499-- | Parses backslash, then applies character parser.
493500escaped :: GenParser Char st Char -- ^ Parser for character to escape
494501 -> GenParser Char st Inline