Skip to content

Commit d95cfc9

Browse files
committed
Fix #16: export decodePatternSet and decodeCharacterClass
1 parent d1fcc58 commit d95cfc9

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

lib/Text/Regex/TDFA/TNFA.hs

+9-6
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@
2929
--
3030
-- Uses recursive do notation.
3131

32-
module Text.Regex.TDFA.TNFA(patternToNFA
33-
,QNFA(..),QT(..),QTrans,TagUpdate(..)) where
32+
module Text.Regex.TDFA.TNFA
33+
( patternToNFA
34+
, decodeCharacterClass, decodePatternSet
35+
, QNFA(..), QT(..), QTrans, TagUpdate(..)
36+
) where
3437

3538
{- By Chris Kuklewicz, 2007. BSD License, see the LICENSE file. -}
3639

@@ -786,7 +789,7 @@ ADD ORPHAN ID check and make this a fatal error while testing
786789
787790
-}
788791

789-
-- | decodePatternSet cannot handle collating element and treats
792+
-- | @decodePatternSet@ cannot handle collating element and treats
790793
-- equivalence classes as just their definition and nothing more.
791794
decodePatternSet :: PatternSet -> S.Set Char
792795
decodePatternSet (PatternSet msc mscc _ msec) =
@@ -795,9 +798,9 @@ decodePatternSet (PatternSet msc mscc _ msec) =
795798
withMSEC = foldl (flip S.insert) withMSCC (maybe [] (concatMap unSEC . S.toAscList) msec)
796799
in withMSEC
797800

798-
-- | This returns the distinct ascending list of characters
799-
-- represented by [: :] values in legalCharacterClasses; unrecognized
800-
-- class names return an empty string
801+
-- | This returns the strictly ascending list of characters
802+
-- represented by @[: :]@ POSIX character classes.
803+
-- Unrecognized class names return an empty string.
801804
decodeCharacterClass :: PatternSetCharacterClass -> String
802805
decodeCharacterClass (PatternSetCharacterClass s) =
803806
case s of

0 commit comments

Comments
 (0)