hlint 1.6.3 → 1.6.4
raw patch · 3 files changed
+5/−3 lines, 3 files
Files
- hlint.cabal +1/−1
- src/HSE/All.hs +2/−1
- src/Hint/Naming.hs +2/−1
hlint.cabal view
@@ -1,7 +1,7 @@ cabal-version: >= 1.6 build-type: Simple name: hlint-version: 1.6.3+version: 1.6.4 license: GPL license-file: LICENSE category: Development
src/HSE/All.hs view
@@ -56,13 +56,14 @@ ,ImplicitParams,FlexibleContexts,FlexibleInstances,EmptyDataDecls -- NOT: CPP ,KindSignatures,BangPatterns,TypeSynonymInstances,TemplateHaskell- ,ForeignFunctionInterface,Arrows,Generics,NoImplicitPrelude,NamedFieldPuns,PatternGuards+ ,ForeignFunctionInterface,Generics,NoImplicitPrelude,NamedFieldPuns,PatternGuards ,GeneralizedNewtypeDeriving,ExtensibleRecords,RestrictedTypeSynonyms,HereDocuments ,MagicHash,TypeFamilies,StandaloneDeriving,UnicodeSyntax,PatternSignatures,UnliftedFFITypes ,LiberalTypeSynonyms,TypeOperators,RecordWildCards,RecordPuns,DisambiguateRecordFields ,OverloadedStrings,GADTs,MonoPatBinds,RelaxedPolyRec,ExtendedDefaultRules,UnboxedTuples ,DeriveDataTypeable,ConstrainedClassMethods,PackageImports,ImpredicativeTypes ,NewQualifiedOperators,PostfixOperators,QuasiQuotes,ViewPatterns+ -- NOT: Arrows - steals proc -- NOT: TransformListComp - steals the group keyword -- NOT: XmlSyntax, RegularPatterns - steals a-b ]
src/Hint/Naming.hs view
@@ -7,6 +7,7 @@ _*[A-Za-z]*_?'? Apply this to things that would get exported by default only+ Also disallow prop_ as it's a standard QuickCheck idiom <TEST> data Yes = Foo | Bar'Test@@ -67,7 +68,7 @@ suggestName :: String -> Maybe String-suggestName x = listToMaybe [f x | not $ isSym x || good]+suggestName x = listToMaybe [f x | not $ isSym x || good || "prop_" `isPrefixOf` x] where good = all isAlphaNum $ drp '_' $ drp '\'' $ reverse $ dropWhile (== '_') x drp x ys = if [x] `isPrefixOf` ys then tail ys else ys