git.iko.soy/typeable/pandoc
on master help sign in
Renamed 'enclosed' to 'inside'.

This avoids conflict with 'enclosed' in Text.Pandoc.Parsing.

commit112717de4e5228b0e4a3bc12fd424ed07a262a8f authorJohn MacFarlane <jgm@berkeley.edu> dateMon 20 Dec 2010, 19:09 (16 years ago) parent2fe271d
1 file changed+7−7
src/Text/Pandoc/Pretty.hs+7−7
src/Text/Pandoc/Pretty.hs+7−7
@@ -59,7 +59,7 @@ module Text.Pandoc.Pretty (
5959 , hsep
6060 , vcat
6161 , vsep
62− , enclosed
62+ , inside
6363 , braces
6464 , brackets
6565 , parens
@@ -334,7 +334,7 @@ blankline :: Doc
334334blankline = Doc $ singleton BlankLine
335335
336336-- | Uses the specified string as a prefix for every line of
337−-- the enclosed document (except the first, if not at the beginning
337+-- the inside document (except the first, if not at the beginning
338338-- of the line).
339339prefixed :: String -> Doc -> Doc
340340prefixed pref doc = Doc $ singleton $ Prefixed pref doc
@@ -398,18 +398,18 @@ chop n cs = case break (=='\n') cs of
398398 where len = length xs
399399
400400-- | Encloses a 'Doc' inside a start and end 'Doc'.
401−enclosed :: Doc -> Doc -> Doc -> Doc
402−enclosed start end contents =
401+inside :: Doc -> Doc -> Doc -> Doc
402+inside start end contents =
403403 start <> contents <> end
404404
405405-- | Puts a 'Doc' in curly braces.
406406braces :: Doc -> Doc
407−braces = enclosed (char '{') (char '}')
407+braces = inside (char '{') (char '}')
408408
409409-- | Puts a 'Doc' in square brackets.
410410brackets :: Doc -> Doc
411−brackets = enclosed (char '[') (char ']')
411+brackets = inside (char '[') (char ']')
412412
413413-- | Puts a 'Doc' in parentheses.
414414parens :: Doc -> Doc
415−parens = enclosed (char '(') (char ')')
415+parens = inside (char '(') (char ')')