1# HLint configuration file
2# https://github.com/ndmitchell/hlint
3##########################
5# This file contains a template configuration file, which is typically
6# placed as .hlint.yaml in the root of your project
9# Specify additional command line arguments
11# - arguments: [--color, --cpp-simple, -XQuasiQuotes]
14# Control which extensions/flags/modules/functions can be used
17# - default: false # all extension are banned by default
18# - name: [PatternGuards, ViewPatterns] # only these listed extensions can be used
19# - {name: CPP, within: CrossPlatform} # CPP can only be used in a given module
22# - {name: -w, within: []} # -w is allowed nowhere
25# - {name: [Data.Set, Data.HashSet], as: Set} # if you import Data.Set qualified, it must be as 'Set'
26# - {name: Control.Arrow, within: []} # Certain modules are banned entirely
29# - {name: unsafePerformIO, within: []} # unsafePerformIO can only appear in no modules
32# Add custom hints for this project
34# Will suggest replacing "wibbleMany [myvar]" with "wibbleOne myvar"
35# - error: {lhs: "wibbleMany [x]", rhs: wibbleOne x}
38# Turn on hints that are off by default
40# Ban "module X(module X) where", to require a real export list
41# - warn: {name: Use explicit module export list}
43# Replace a $ b $ c with a . b $ c
44# - group: {name: dollar, enabled: true}
46# Generalise map to fmap, ++ to <>
47# - group: {name: generalise, enabled: true}
50# Ignore some builtin hints
51# - ignore: {name: Use let}
52# - ignore: {name: Use const, within: SpecialModule} # Only within certain modules
55# Define some custom fixity operators
56# - fixity: infixr 3 ~^#^~
59# To generate a suitable file for HLint do:
60# $ hlint --default > .hlint.yaml
62- ignore: {name: "Use list comprehension"}
65 - -XAllowAmbiguousTypes
72 - -XFunctionalDependencies
74 - -XGeneralizedNewtypeDeriving
76 - -XMultiParamTypeClasses
80 - -XScopedTypeVariables
81 - -XStandaloneDeriving
86 - -XUndecidableInstances
89# hints found in src/Control/SemiIso.hs
90- warn: {lhs: "SI (pure . a) (pure . b)", rhs: "siPure a b"}
91- warn: {lhs: "SemiIso (pure . a) (pure . b)", rhs: "siPure a b"}
92- warn: {lhs: "SemiIso (const empty) (const empty)", rhs: "zeroArrow"}
94# hints found in src/Control/Arrow/Extra.hs
95- fixity: "infixl 5 <+^"
96- fixity: "infixl 5 ^+>"
97- fixity: "infixl 5 ^+^"
98- warn: {lhs: "a <+> arr b", rhs: "a <+^ b"}
99- warn: {lhs: "arr a <+> b", rhs: "a ^+> b"}
100- warn: {lhs: "arr a <+> arr b", rhs: "a ^+^ b"}
102# hints found in src/Control/Arrow/Extra/ArrowChoice.hs
103- fixity: "infixl 2 +++"
104- fixity: "infixl 2 |||"
106# hints found in src/Control/Arrow/Extra/ArrowPlus.hs
107- fixity: "infixl 5 <+>"
109# hints found in src/Control/Arrow/Extra/ArrowZero.hs
112# hints found in src/Control/Arrow/Extra/BaseArrow.hs
113- fixity: "infixl 3 ***"
114- fixity: "infixl 3 &&&"
115- fixity: "infixl 1 >>>"
116- fixity: "infixl 1 <<<"
118# hints found in src/Control/Arrow/Extra/Orphans.hs
121# hints found in src/Control/Arrow/Extra/PolyArrow.hs
122- fixity: "infixl 1 ^>>"
123- fixity: "infixl 1 >>^"
124- fixity: "infixl 1 ^<<"
125- fixity: "infixl 1 <<^"
126- fixity: "infixl 1 ^>^"
127- fixity: "infixl 1 ^<^"
128- warn: {lhs: "arr a >>> arr b", rhs: "a ^>^ b"}
129- warn: {lhs: "arr a <<< arr b", rhs: "a ^<^ b"}
130- warn: {lhs: "arr a >>> b", rhs: "a ^>> b"}
131- warn: {lhs: "a >>> arr b", rhs: "a >>^ b"}
132- warn: {lhs: "a <<< arr b", rhs: "a <<^ b"}
133- warn: {lhs: "arr a <<< b", rhs: "a ^<< b"}
135# hints found in src/Data/Isoparsec.hs
136- warn: {lhs: "a <+^ konst ()", rhs: "opt a"}
137- warn: {lhs: "opt (b >>^ turn (konst a))", rhs: "opt' a b"}
138- warn: {lhs: "(a &&& (repeating a <+^ konst [])) >>^ siCons", rhs: "repeating a"}
139- warn: {lhs: "sepBy1 a b <+^ konst []", rhs: "sepBy a b"}
140- warn: {lhs: "(b &&& repeating (a *>> b) <+^ konst []) >>^ siCons", rhs: "sepBy1 a b"}
141- fixity: "infixl 0 <.>"
142- warn: {lhs: "(b >>^ morphed) >>^ siPrism a", rhs: "a <.> b"}
143- warn: {lhs: "withPrism a\n (\\ x y -> SemiIso (pure . x) (either (const empty) pure . y))", rhs: "siPrism a"}
144- fixity: "infixl 8 ~>"
145- fixity: "infixl 8 ~>^"
146- fixity: "infixl 8 ^~>"
147- fixity: "infixl 8 ^~>^"
148- warn: {lhs: "turn siHFst ^>> (enlist a *** enlist b) >>^ siHFst", rhs: "a ~> b"}
149- warn: {lhs: "siPure fst (, HNil)", rhs: "siHFst"}
150- fixity: "infixl 5 ~|"
151- warn: {lhs: "enlist a <+> enlist b", rhs: "a ~| b"}
152- fixity: "infixl 7 ~&"
153- warn: {lhs: "(enlist a &&& enlist b) >>^ consHList", rhs: "a ~& b"}
154- fixity: "infixl 9 ~*"
155- warn: {lhs: "turn consHList ^>> (enlist a *** enlist b) >>^ consHList", rhs: "a ~* b"}
156- fixity: "infixl 6 ~$>"
157- warn: {lhs: "enlist a >>> enlist (arr (siPrism b))", rhs: "a ~$> b"}
158- warn: {lhs: "turn fMorphed ^>>\n (a (fMorphed ^>> b >>^ turn fMorphed)) >>^ fMorphed", rhs: "hmap a b"}
159- warn: {lhs: "siPure coerce coerce", rhs: "coercing"}
160- warn: {lhs: "siPure morphTuples morphTuples", rhs: "morphed"}
161- warn: {lhs: "siPure flatUnmorph flatMorph", rhs: "fMorphed"}
162- warn: {lhs: "turn fMorphed ^>> a >>^ fMorphed", rhs: "enlist a"}
163- warn: {lhs: "fMorphed ^>> a >>^ turn fMorphed", rhs: "delist a"}
164- warn: {lhs: "siPure (uncurry (++:))\n (\\ c -> (hTake @(Length a) Proxy c, hDrop @(Length a) Proxy c))", rhs: "consHList"}
165- warn: {lhs: "auto @x >>^ turn (konst a)", rhs: "specific a"}
166- warn: {lhs: "siPure fromIntegral fromIntegral", rhs: "throughIntegral"}
168# hints found in src/Data/Isoparsec/ByteString.hs
169- warn: {lhs: "arr (siPure C.unpack C.pack)", rhs: "utf8"}
170- warn: {lhs: "bytesToIsoparsec (Proxy @e) >>^ coercing @(Byte16 e) @Word16", rhs: "toIsoparsec"}
171- warn: {lhs: "bytesToIsoparsec (Proxy @e) >>^ coercing @(Byte32 e) @Word32", rhs: "toIsoparsec"}
172- warn: {lhs: "bytesToIsoparsec (Proxy @e) >>^ coercing @(Byte64 e) @Word64", rhs: "toIsoparsec"}
173- warn: {lhs: "anyToken >>> mapIso [(0, False), (1, True)]", rhs: "toIsoparsec"}
175# hints found in src/Data/Isoparsec/Char.hs
176- warn: {lhs: "token ' '", rhs: "space"}
177- warn: {lhs: "tokensWhile isSpace >>^ ((maskr . turn . konst) mempty)", rhs: "unsafeWhiteSpace"}
178- warn: {lhs: "tokensWhile1 isSpace >>^ ((maskr . turn . konst) (singleton ' '))", rhs: "unsafeWhiteSpace1"}
180# hints found in src/Data/Isoparsec/Cokleisli.hs
181- warn: {lhs: "Cokleisli\n (\\ t ->\n case project a t of\n Just x -> return x\n Nothing -> mzero)", rhs: "arr a"}
182- warn: {lhs: "Cokleisli (const mzero)", rhs: "zeroArrow"}
184# hints found in src/Data/Isoparsec/Internal.hs
185- warn: {lhs: "((a &&& arrowsWhile a) >>^ siCons) <+^ isoConst () []", rhs: "arrowsWhile a"}
186- warn: {lhs: "siMaybe (pure . uncurry cons) uncons", rhs: "siCons"}
187- warn: {lhs: "SI (\\ c -> guard (a c) >> b c)\n (c >=> (\\ c -> guard (a c) >> pure c))", rhs: "siCheck a b c"}
188- warn: {lhs: "siCheck a (pure . b) (pure . c)", rhs: "isoCheck a b c"}
189- warn: {lhs: "SI (const (pure b)) (const (pure a))", rhs: "isoConst a b"}
190- warn: {lhs: "isoCheck a id id", rhs: "check a"}
191- warn: {lhs: "SI (const (pure a)) (const (pure ())) >>> check (== a)", rhs: "konst a"}
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list