From fea4f8690111a8bbb65845fb61961cfc0a9802cc Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 12 Jan 2016 00:56:58 +0000 Subject: removed unused Arbitrary BBToken --- bbcode/src/Text/BBCode/Lexer.hs | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'bbcode/src/Text') diff --git a/bbcode/src/Text/BBCode/Lexer.hs b/bbcode/src/Text/BBCode/Lexer.hs index 8060ed0..01f47f0 100644 --- a/bbcode/src/Text/BBCode/Lexer.hs +++ b/bbcode/src/Text/BBCode/Lexer.hs @@ -25,25 +25,7 @@ import GHC.Generics (Generic) data BBToken = BBOpen Text -- ^ Tag open | BBClose Text -- ^ Tag close | BBStr Text -- ^ Content of a tag - deriving (Generic, Eq, Show, CoArbitrary) - --- | This instance does not produce: --- --- * opening and closing tags whose 'Text' ends in @\\@ --- * empty 'BBStr's -instance Arbitrary BBToken where - shrink = genericShrink - arbitrary = oneof [ BBOpen <$> tagText - , BBClose <$> tagText - , BBStr <$> nonEmpty - ] - where - tagText = arbitrary `suchThat` (not . lastIsEscape) - lastIsEscape t - | T.null t = False - | T.last t == '\\' = True - | otherwise = False - nonEmpty = (arbitrary `suchThat` (not . T.null)) + deriving (Generic, Eq, Show) token :: Parser BBToken -- ^ Tokenizer -- cgit v1.2.3