isoparsec/.hlint.yaml
iko f6a4642235
🐛 wiggle wiggle wiggle (#47)
* 🐛 wiggle wiggle wiggle

* Removed Market export

* Made it compile

* Renamed operators

* JSON

* Some renaming

* HLint update

* Revert "HLint update"

This reverts commit 60ab005a08.

* Updated hlint
2020-03-15 23:27:52 +03:00

192 lines
7.1 KiB
YAML

# HLint configuration file
# https://github.com/ndmitchell/hlint
##########################
# This file contains a template configuration file, which is typically
# placed as .hlint.yaml in the root of your project
# Specify additional command line arguments
#
# - arguments: [--color, --cpp-simple, -XQuasiQuotes]
# Control which extensions/flags/modules/functions can be used
#
# - extensions:
# - default: false # all extension are banned by default
# - name: [PatternGuards, ViewPatterns] # only these listed extensions can be used
# - {name: CPP, within: CrossPlatform} # CPP can only be used in a given module
#
# - flags:
# - {name: -w, within: []} # -w is allowed nowhere
#
# - modules:
# - {name: [Data.Set, Data.HashSet], as: Set} # if you import Data.Set qualified, it must be as 'Set'
# - {name: Control.Arrow, within: []} # Certain modules are banned entirely
#
# - functions:
# - {name: unsafePerformIO, within: []} # unsafePerformIO can only appear in no modules
# Add custom hints for this project
#
# Will suggest replacing "wibbleMany [myvar]" with "wibbleOne myvar"
# - error: {lhs: "wibbleMany [x]", rhs: wibbleOne x}
# Turn on hints that are off by default
#
# Ban "module X(module X) where", to require a real export list
# - warn: {name: Use explicit module export list}
#
# Replace a $ b $ c with a . b $ c
# - group: {name: dollar, enabled: true}
#
# Generalise map to fmap, ++ to <>
# - group: {name: generalise, enabled: true}
# Ignore some builtin hints
# - ignore: {name: Use let}
# - ignore: {name: Use const, within: SpecialModule} # Only within certain modules
# Define some custom fixity operators
# - fixity: infixr 3 ~^#^~
# To generate a suitable file for HLint do:
# $ hlint --default > .hlint.yaml
- ignore: {name: "Use list comprehension"}
- arguments:
- -XAllowAmbiguousTypes
- -XConstraintKinds
- -XDataKinds
- -XDefaultSignatures
- -XDeriveGeneric
- -XFlexibleContexts
- -XFlexibleInstances
- -XFunctionalDependencies
- -XGADTs
- -XGeneralizedNewtypeDeriving
- -XLambdaCase
- -XMultiParamTypeClasses
- -XOverloadedStrings
- -XPatternSynonyms
- -XPolyKinds
- -XScopedTypeVariables
- -XStandaloneDeriving
- -XTupleSections
- -XTypeApplications
- -XTypeFamilies
- -XTypeOperators
- -XUndecidableInstances
- -XRankNTypes
# hints found in src/Control/SemiIso.hs
- warn: {lhs: "SI (pure . a) (pure . b)", rhs: "siPure a b"}
- warn: {lhs: "SemiIso (pure . a) (pure . b)", rhs: "siPure a b"}
- warn: {lhs: "SemiIso (const empty) (const empty)", rhs: "zeroArrow"}
# hints found in src/Control/Arrow/Extra.hs
- fixity: "infixl 5 <+^"
- fixity: "infixl 5 ^+>"
- fixity: "infixl 5 ^+^"
- warn: {lhs: "a <+> arr b", rhs: "a <+^ b"}
- warn: {lhs: "arr a <+> b", rhs: "a ^+> b"}
- warn: {lhs: "arr a <+> arr b", rhs: "a ^+^ b"}
# hints found in src/Control/Arrow/Extra/ArrowChoice.hs
- fixity: "infixl 2 +++"
- fixity: "infixl 2 |||"
# hints found in src/Control/Arrow/Extra/ArrowPlus.hs
- fixity: "infixl 5 <+>"
# hints found in src/Control/Arrow/Extra/ArrowZero.hs
# no hints found
# hints found in src/Control/Arrow/Extra/BaseArrow.hs
- fixity: "infixl 3 ***"
- fixity: "infixl 3 &&&"
- fixity: "infixl 1 >>>"
- fixity: "infixl 1 <<<"
# hints found in src/Control/Arrow/Extra/Orphans.hs
# no hints found
# hints found in src/Control/Arrow/Extra/PolyArrow.hs
- fixity: "infixl 1 ^>>"
- fixity: "infixl 1 >>^"
- fixity: "infixl 1 ^<<"
- fixity: "infixl 1 <<^"
- fixity: "infixl 1 ^>^"
- fixity: "infixl 1 ^<^"
- warn: {lhs: "arr a >>> arr b", rhs: "a ^>^ b"}
- warn: {lhs: "arr a <<< arr b", rhs: "a ^<^ b"}
- warn: {lhs: "arr a >>> b", rhs: "a ^>> b"}
- warn: {lhs: "a >>> arr b", rhs: "a >>^ b"}
- warn: {lhs: "a <<< arr b", rhs: "a <<^ b"}
- warn: {lhs: "arr a <<< b", rhs: "a ^<< b"}
# hints found in src/Data/Isoparsec.hs
- warn: {lhs: "a <+^ konst ()", rhs: "opt a"}
- warn: {lhs: "opt (b >>^ turn (konst a))", rhs: "opt' a b"}
- warn: {lhs: "(a &&& (repeating a <+^ konst [])) >>^ siCons", rhs: "repeating a"}
- warn: {lhs: "sepBy1 a b <+^ konst []", rhs: "sepBy a b"}
- warn: {lhs: "(b &&& repeating (a *>> b) <+^ konst []) >>^ siCons", rhs: "sepBy1 a b"}
- fixity: "infixl 0 <.>"
- warn: {lhs: "(b >>^ morphed) >>^ siPrism a", rhs: "a <.> b"}
- warn: {lhs: "withPrism a\n (\\ x y -> SemiIso (pure . x) (either (const empty) pure . y))", rhs: "siPrism a"}
- fixity: "infixl 8 ~>"
- fixity: "infixl 8 ~>^"
- fixity: "infixl 8 ^~>"
- fixity: "infixl 8 ^~>^"
- warn: {lhs: "turn siHFst ^>> (enlist a *** enlist b) >>^ siHFst", rhs: "a ~> b"}
- warn: {lhs: "siPure fst (, HNil)", rhs: "siHFst"}
- fixity: "infixl 5 ~|"
- warn: {lhs: "enlist a <+> enlist b", rhs: "a ~| b"}
- fixity: "infixl 7 ~&"
- warn: {lhs: "(enlist a &&& enlist b) >>^ consHList", rhs: "a ~& b"}
- fixity: "infixl 9 ~*"
- warn: {lhs: "turn consHList ^>> (enlist a *** enlist b) >>^ consHList", rhs: "a ~* b"}
- fixity: "infixl 6 ~$>"
- warn: {lhs: "enlist a >>> enlist (arr (siPrism b))", rhs: "a ~$> b"}
- warn: {lhs: "turn fMorphed ^>>\n (a (fMorphed ^>> b >>^ turn fMorphed)) >>^ fMorphed", rhs: "hmap a b"}
- warn: {lhs: "siPure coerce coerce", rhs: "coercing"}
- warn: {lhs: "siPure morphTuples morphTuples", rhs: "morphed"}
- warn: {lhs: "siPure flatUnmorph flatMorph", rhs: "fMorphed"}
- warn: {lhs: "turn fMorphed ^>> a >>^ fMorphed", rhs: "enlist a"}
- warn: {lhs: "fMorphed ^>> a >>^ turn fMorphed", rhs: "delist a"}
- warn: {lhs: "siPure (uncurry (++:))\n (\\ c -> (hTake @(Length a) Proxy c, hDrop @(Length a) Proxy c))", rhs: "consHList"}
- warn: {lhs: "auto @x >>^ turn (konst a)", rhs: "specific a"}
- warn: {lhs: "siPure fromIntegral fromIntegral", rhs: "throughIntegral"}
# hints found in src/Data/Isoparsec/ByteString.hs
- warn: {lhs: "arr (siPure C.unpack C.pack)", rhs: "utf8"}
- warn: {lhs: "bytesToIsoparsec (Proxy @e) >>^ coercing @(Byte16 e) @Word16", rhs: "toIsoparsec"}
- warn: {lhs: "bytesToIsoparsec (Proxy @e) >>^ coercing @(Byte32 e) @Word32", rhs: "toIsoparsec"}
- warn: {lhs: "bytesToIsoparsec (Proxy @e) >>^ coercing @(Byte64 e) @Word64", rhs: "toIsoparsec"}
- warn: {lhs: "anyToken >>> mapIso [(0, False), (1, True)]", rhs: "toIsoparsec"}
# hints found in src/Data/Isoparsec/Char.hs
- warn: {lhs: "token ' '", rhs: "space"}
- warn: {lhs: "tokensWhile isSpace >>^ ((maskr . turn . konst) mempty)", rhs: "unsafeWhiteSpace"}
- warn: {lhs: "tokensWhile1 isSpace >>^ ((maskr . turn . konst) (singleton ' '))", rhs: "unsafeWhiteSpace1"}
# hints found in src/Data/Isoparsec/Cokleisli.hs
- warn: {lhs: "Cokleisli\n (\\ t ->\n case project a t of\n Just x -> return x\n Nothing -> mzero)", rhs: "arr a"}
- warn: {lhs: "Cokleisli (const mzero)", rhs: "zeroArrow"}
# hints found in src/Data/Isoparsec/Internal.hs
- warn: {lhs: "((a &&& arrowsWhile a) >>^ siCons) <+^ isoConst () []", rhs: "arrowsWhile a"}
- warn: {lhs: "siMaybe (pure . uncurry cons) uncons", rhs: "siCons"}
- warn: {lhs: "SI (\\ c -> guard (a c) >> b c)\n (c >=> (\\ c -> guard (a c) >> pure c))", rhs: "siCheck a b c"}
- warn: {lhs: "siCheck a (pure . b) (pure . c)", rhs: "isoCheck a b c"}
- warn: {lhs: "SI (const (pure b)) (const (pure a))", rhs: "isoConst a b"}
- warn: {lhs: "isoCheck a id id", rhs: "check a"}
- warn: {lhs: "SI (const (pure a)) (const (pure ())) >>> check (== a)", rhs: "konst a"}