cln: hlint: Rename pattern variables to avoid hlint parsing errors.
This commit is contained in:
		
							parent
							
								
									03db46cc81
								
							
						
					
					
						commit
						063aaf35b5
					
				| @ -50,8 +50,6 @@ | |||||||
| - ignore: {name: "Use second"} | - ignore: {name: "Use second"} | ||||||
| - ignore: {name: "Use fromRight"} | - ignore: {name: "Use fromRight"} | ||||||
| - ignore: {name: "Use fromLeft"} | - ignore: {name: "Use fromLeft"} | ||||||
| - ignore: {name: "Parse error: on input `$*'"} |  | ||||||
| - ignore: {name: "Parse error: on input `pattern'"} |  | ||||||
| - ignore: {name: "Redundant bang pattern"} | - ignore: {name: "Redundant bang pattern"} | ||||||
| - ignore: {name: "Use zipWith"} | - ignore: {name: "Use zipWith"} | ||||||
| - ignore: {name: "Replace case with maybe"} | - ignore: {name: "Replace case with maybe"} | ||||||
|  | |||||||
| @ -199,7 +199,7 @@ words'' :: [T.Text] -> T.Text -> [T.Text] | |||||||
| words'' prefixes = fromparse . parsewith maybeprefixedquotedphrases -- XXX | words'' prefixes = fromparse . parsewith maybeprefixedquotedphrases -- XXX | ||||||
|     where |     where | ||||||
|       maybeprefixedquotedphrases :: SimpleTextParser [T.Text] |       maybeprefixedquotedphrases :: SimpleTextParser [T.Text] | ||||||
|       maybeprefixedquotedphrases = choice' [prefixedQuotedPattern, singleQuotedPattern, doubleQuotedPattern, pattern] `sepBy` skipNonNewlineSpaces1 |       maybeprefixedquotedphrases = choice' [prefixedQuotedPattern, singleQuotedPattern, doubleQuotedPattern, patterns] `sepBy` skipNonNewlineSpaces1 | ||||||
|       prefixedQuotedPattern :: SimpleTextParser T.Text |       prefixedQuotedPattern :: SimpleTextParser T.Text | ||||||
|       prefixedQuotedPattern = do |       prefixedQuotedPattern = do | ||||||
|         not' <- fromMaybe "" `fmap` (optional $ string "not:") |         not' <- fromMaybe "" `fmap` (optional $ string "not:") | ||||||
| @ -214,8 +214,8 @@ words'' prefixes = fromparse . parsewith maybeprefixedquotedphrases -- XXX | |||||||
|       singleQuotedPattern = between (char '\'') (char '\'') (many $ noneOf ("'" :: [Char])) >>= return . stripquotes . T.pack |       singleQuotedPattern = between (char '\'') (char '\'') (many $ noneOf ("'" :: [Char])) >>= return . stripquotes . T.pack | ||||||
|       doubleQuotedPattern :: SimpleTextParser T.Text |       doubleQuotedPattern :: SimpleTextParser T.Text | ||||||
|       doubleQuotedPattern = between (char '"') (char '"') (many $ noneOf ("\"" :: [Char])) >>= return . stripquotes . T.pack |       doubleQuotedPattern = between (char '"') (char '"') (many $ noneOf ("\"" :: [Char])) >>= return . stripquotes . T.pack | ||||||
|       pattern :: SimpleTextParser T.Text |       patterns :: SimpleTextParser T.Text | ||||||
|       pattern = fmap T.pack $ many (noneOf (" \n\r" :: [Char])) |       patterns = fmap T.pack $ many (noneOf (" \n\r" :: [Char])) | ||||||
| 
 | 
 | ||||||
| -- XXX | -- XXX | ||||||
| -- keep synced with patterns below, excluding "not" | -- keep synced with patterns below, excluding "not" | ||||||
|  | |||||||
| @ -134,10 +134,10 @@ words' :: String -> [String] | |||||||
| words' "" = [] | words' "" = [] | ||||||
| words' s  = map stripquotes $ fromparse $ parsewithString p s | words' s  = map stripquotes $ fromparse $ parsewithString p s | ||||||
|     where |     where | ||||||
|       p = do ss <- (singleQuotedPattern <|> doubleQuotedPattern <|> pattern) `sepBy` skipNonNewlineSpaces1 |       p = do ss <- (singleQuotedPattern <|> doubleQuotedPattern <|> patterns) `sepBy` skipNonNewlineSpaces1 | ||||||
|              -- eof |              -- eof | ||||||
|              return ss |              return ss | ||||||
|       pattern = many (noneOf whitespacechars) |       patterns = many (noneOf whitespacechars) | ||||||
|       singleQuotedPattern = between (char '\'') (char '\'') (many $ noneOf "'") |       singleQuotedPattern = between (char '\'') (char '\'') (many $ noneOf "'") | ||||||
|       doubleQuotedPattern = between (char '"') (char '"') (many $ noneOf "\"") |       doubleQuotedPattern = between (char '"') (char '"') (many $ noneOf "\"") | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user