! 0<      !"#$%&'()*+,-./0123456789:;=None^<=>None i?hlintUExtensions we turn on by default when parsing. Aim to parse as many files as we can.@hlintExtensions we turn on when reading config files, don't have to deal with the whole world of variations - in particular, we might require spaces in some places.AhlintFThis extension implies the following extensions are enabled/disabled.BhlintW(a, bs) means extension a implies all of bs. Uses GHC source at DynFlags.impliedXFlags?@ACNone% hlintA Fixity definition, comprising the name the fixity applies to, the direction and the precedence. As an example, a source file containing: infixr 3 `foo` would create ("foo", RightAssociative, 3). DEFGHIJKNoneLhlintA comment as a string.Mhlint+The comment string with delimiters removed.LMNOPQRSNone=>?@AThlintLIs this item lexically requiring no bracketing ever i.e. is totally atomic.UhlintlIs the child safe free from brackets in the parent position. Err on the side of caution, True = don't know.VhlintAm I an HsApp such that having me in an infix doesn't require brackets. Before BlockArguments that was _all_ HsApps. Now, imagine:$(f x -> x) *> ... (f do x) *> ...WXYZT[\UNoneL]^None=>?HV_hlintAReturn the variables, erring on the side of more free variables.`hlintAReturn the variables, erring on the side of more free variables. a_b`cdefghi None$'jhlint declName xQ returns the "new name" that is created (for example a function declaration) by x. If xV isn't a declaration that creates a new name (for example an instance declaration), k is returned instead. This is useful because we don't want to tell users to rename binders that they aren't creating right now and therefore usually cannot change.jl Nonefmn None%Mopqrs NoneM tuv None%=?@Ag {wxyz{|}~Safe None!1Safe!tNone_#xhlintHDon't crash in case ghc gives us a "fake" span, opting instead to show  -1 -1 -1 -1 coordinates.None %=>?@AHPV&{hlint'dotApp a b' makes 'a . b'.hlintlambda [p0, p1..pn] body makes p1 p1 .. pn -> bodyhlint'paren e' wraps e in parens if e is non-atomic.ZT[\UNone'NoneESX'qNone%4>MPX)dhlint(Unification, obeys the property that if  unify a b = s, then substitute s a = b.None%g*hlint3The "Line'" thing is because there is already e.g. ZLMNOPQRSZT[\U]^a_b`cdefghijlmnopqrstuvwxyz{|}~None%>G0hlint Result of , representing a parsed module.hlintA parse error.hlintLocation of the error.hlint%Message about the cause of the error.hlint3Snippet of several lines (typically 5) including a >' character pointing at the faulty line.hlint Created with  , used by . hlint*How the file is preprocessed (defaults to ). hlint9Base language (e.g. Haskell98, Haskell2010), defaults to k. hlintTList of extensions enabled for parsing, defaults to many non-conflicting extensions. hlint7List of extensions disabled for parsing, usually empty. hlint>List of fixities to be aware of, defaults to those defined in base.hlint$What C pre processor should be used.hlintNo pre processing is done.hlintLines prefixed with # are stripped.hlintThe cpphs library is used.hlintDefault value for .hlint:Given some fixities, add them to the existing fixities in .hlint4Extract a list of all of a parsed module's comments.hlint6The error handler invoked when GHC parsing has failed.hlint Create a  from GHC annotations and module tree. It is assumed the incoming parse module has not been adjusted to account for operator fixities (it uses the HLint default fixities).hlintParse a Haskell module. Applies the C pre processor, and uses best-guess fixity resolution if there are ambiguities. The filename - is treated as stdin. Requires some flags (often ;), the filename, and optionally the contents of that file.!Note that certain programs, e.g.  main = doy successfully parse with GHC, but then fail with an error in the renamer. These programs will return a successful parse.hlintUGiven a line number, and some source code, put bird ticks around the appropriate bit. NonechlintExtra command-line argumenthlintA  LHS ==> RHS style hint rule.hlintDefault severity for the hint.hlintName for the hint.hlint$Notes about application of the hint.hlintYModule scope in which the hint operates (GHC parse tree). We wrap these GHC elements in  in order that we may derive .hlintLHS (GHC parse tree).hlintRHS (GHC parse tree).hlint Side condition (GHC parse tree).hlintHow to classify an Idea. If any matching field is "" then it matches everything.hlintSeverity to set the Idea to.hlint Match on Idea field ideaHint.hlint Match on Idea field  ideaModule.hlint Match on Idea field ideaDecl.hlint0A note describing the impact of the replacement.hlint=The replacement is increases laziness, for example replacing reverse (reverse x) with x makes the code lazier.hlint=The replacement is decreases laziness, for example replacing (fst x, snd x) with x makes the code stricter.hlint6The replacement removes errors, for example replacing  foldr1 (+) with sum removes an error on [], and might contain the text "on []". hlintIThe replacement assumes standard type class lemmas, a hint with the note ValidInstance "Eq" "x" might only be valid if the x variable has a reflexive Eq instance.!hlint8The replacement requires this extension to be available."hlintAn arbitrary note.#hlintHow severe an issue is.$hlintGThe issue has been explicitly ignored and will usually be hidden (pass --show+ on the command line to see ignored ideas).%hlintTSuggestions are things that some people may consider improvements, but some may not.&hlintEWarnings are suggestions that are nearly always a good idea to apply.'hlintTAvailable as a setting for the user. Only parse errors have this setting by default.<"! #'$&%NonedNone"#n (hlintAn idea suggest by a Hint.*hlint1The modules the idea is for, usually a singleton.+hlintkThe declarations the idea is for, usually a singleton, typically the function name, but may be a type name.,hlintThe severity of the idea, e.g. &.-hlint3The name of the hint that generated the idea, e.g.  "Use reverse"..hlint$The source code the idea relates to./hlint4The contents of the source code the idea relates to.0hlintThe suggested replacement, or k+ for no replacement (e.g. on parse errors).1hlint3Notes about the effect of applying the replacement.2hlintHow to perform this idea$"! #'$&%()10-*+,./2  None"#Mp hlint$Returns the number of failing tests.   NoneqhlintBGiven a set of hints, do all the HintRule hints satisfy QuickCheckNone"#%Xrhlint,First string may have stars in it (the want)None"#sNoney}3hlint0Functions to generate hints, combined using the  instance.hlintDGiven a list of modules (and their scope information) generate some (s.hlint>Given a single module and its scope information generate some (s.hlint<Given a declaration (with a module and scope) generate some ([s. This function will be partially applied with one module/scope, then used on multiple Decl values.N "! #'$&%()10-*+,./2  3 Nonez!None%>{7 "None%HV{!#None$"hlintwGiven a declaration, returns the suggested "newtype"ized declaration following these guidelines: * Types ending in a "Q\" are __ignored__, because they are usually unboxed primitives - @data X = X Int * ExistentialQuantification stuff is ignored - data X = forall t. X t1 * Constructors with (nonempty) constraints are ignored - data X a = (Eq a) => X a- * Single field constructors get newtyped - data X = X Int -> newtype X = X Int4 * Single record field constructors get newtyped - data X = X {getX :: Int} -> Cnewtype X = X {getX :: Int}@ * All other declarations are ignored.#hlintGChecks whether its argument is a "simple constructor" (see criteria in singleSimpleFieldNew^) returning the type inside the constructor if it is. This is needed for strictness analysis.$hlintThe "Bang" here refers to %, which notably also includes UNPACK pragmas!&$None%>'%None%>_(hlint@Call with the name of the declaration, the nearest enclosing `do`M expression the nearest enclosing expression the expression of interest)hlintARewrite 'do ...; x <- return y; ...' as 'do ...; let x = y; ...'.*&None"#%+'None%>j,(None%=-hlint>Squash lambdas and replace any repeated pattern variable with _.hlintUReplaces all non-wildcard patterns with a variable pattern with the given identifier./)None"#0*None$_1hlint+Classes that can't require newtype deriving2hlint>Classes that can appear as stock, and can't appear as anyclass3+NoneHV4,None>X5hlintThe position to return if we match at this point, and the map of where to go next If two runs have the same vals, always use the first pos you find6-None7.None%>HVX8/None9:0None "#%HV_`O;1None"#$%>P<hlint7A list of root expressions, with their associated names=2None>>hlintWA list of the builtin hints wired into HLint. This list is likely to grow over time.?hlint=A list of builtin hints, currently including entries such as "List" and  "Bracket".@hlintTransform a list of > or  into a 3.AhlintTransform a list of  into a 3. 3?@A3None"#%>MPMBhlintRead a config file in YAML format. Takes a filename, and optionally the contents. Fails if the YAML doesn't parse or isn't valid HLint YAMLChlintBFailed when parsing some value, give an informative error message.DBE4NoneF5None"#$iGhlintGiven a source file, guess some hints that might apply. Returns the text of the hints (if you want to save it down) along with the settings to be used.G6None"#Hhlint Print an I* with trailing null-terminator and newlineHThe trailing newline will be ignored, but makes the output more readableJhlintConvert an hlint (, to a datatype more easily serialized for CCHJ7None%PKhlint Read an {- ANN }-} pragma and determine if it is intended for HLint. Return Nothing if it is not an HLint pragma, otherwise what it means.KL8NoneMhlintDApply hints to a single file, you may have the contents of the file.NhlintAApply hints to multiple files, allowing cross-file hints to fire.Ohlint*Given a way of classifying results, and a 31, apply to a set of modules generating a list of ( s. The (& values will be ordered within a file.9Given a set of modules, it may be faster to pass each to O in a singleton list. When given multiple modules at once this function attempts to find hints between modules, which is slower and often pointless (by default HLint passes modules singularly, using --cross to pass all modules together).PhlintbGiven a list of settings (a way to classify) and a list of hints, run them over a list of modules.QhlintbReturn either an idea (a parse error) or the module. In IO because might call the C pre processor.Rhlint,Find which hints a list of settings implies.ShlintIGiven some settings, make sure the severity field of the Idea is correct.MNO9None"#%T:NoneIU;None2PVhlint.which files to run it on, nothing = none givenWhlintwhere to generate reportsXhlint)which settignsfiles were explicitly givenYhlint)groups that are given on the command lineZhlintuse git ls-files to find files[hlintcolor the result\hlint/Numbmer of threads to use, 0 = whatever GHC has]hlintthe hints to ignore^hlintdisplay all skipped items_hlint extensions`hlint#the extensions (may be prefixed by No)ahlintRwork between source files, applies to hints such as duplicate code between modulesbhlint!source files to look for hints inchlintthe data directorydhlintPrint a default file to stdoutehlintdisplay hint data as JSONfhlint(display hint data as Code Climate Issuesghlintdo not show the summary infohhlintspecify which hints explicitlyihlint%Display hints in serialisation formatjhlintRun the refactor* executable to automatically perform hintskhlintOptions to pass to the refactor executable.lhlintPath to refactor toolmhlinta proof script to check againstnhlint'temporary directory to put the files inohlintWhen to colour terminal output.phlint'Terminal output will never be coloured.qhlint(Terminal output will always be coloured.rhlintJTerminal output will be coloured if $TERM and stdout appear to support it.shlintWhere should we find the configuration files? Either we use the implicit search, or we follow the cmdGivenHints We want more important hints to go last, since they overridethlint(Determines whether to use colour or not.uhlintTemporary filehlint%File to resolve, may be "-" for stdin4vwxyz_cZVWXY[\]^`abd{|}~efghijklmnstu<None"#=None"#u4hlintvThis function takes a list of command line arguments, and returns the given hints. To see a list of arguments type  hlint --helpN at the console. This function writes to the stdout/stderr streams, unless --quiet is specified.As an example: ldo hints <- hlint ["src", "--ignore=Use map","--quiet"] when (length hints > 3) $ error "Too many hints!"Warning: The flags provided by HLint are relatively stable, but do not have the same API stability guarantees as the rest of the strongly-typed API. Do not run this function on your server with untrusted input.4None"#L 5hlint1Get the Cabal configured data directory of HLint.6hlint'The function produces a tuple containg  (for  ), and  and 3 for :C. It approximates the normal HLint configuration steps, roughly: Use 9 with 8+ to find and load the HLint settings files.Use  and  resolveHints to transform the outputs of 9.If you want to do anything custom (e.g. using a different data directory, storing intermediate outputs, loading hints from a database) you are expected to copy and paste this function, then change it to your needs.7hlint A version of 6 which respects some of the arguments supported by HLint. If arguments unrecognised by HLint are used it will result in an error. Arguments which have no representation in the return type are silently ignored.8hlintGiven a directory (or k to imply 5), and a module name (e.g.  HLint.Defaulto), find the settings file associated with it, returning the name of the file, and (optionally) the contents.9This function looks for all settings files starting with HLint.U in the directory argument, and all other files relative to the current directory.9hlint-Given a function to load a module (typically 8.), and a module to start from (defaults to  hlint.yaml/) find the information from all settings files.hlintSplit a list of 0 for separate use in parsing and hint resolution:hlint*Given a way of classifying results, and a 31, apply to a set of modules generating a list of ( s. The (& values will be ordered within a file.9Given a set of modules, it may be faster to pass each to : in a singleton list. When given multiple modules at once this function attempts to find hints between modules, which is slower and often pointless (by default HLint passes modules singularly, using --cross to pass all modules together).hlintISnippet from the documentation, if this changes, update the documentation;hlint Unpack a " value. Useful to allow using the (/ information without adding a dependency on ghc or ghc-lib-parser. Unpacking gives: 4(filename, (startLine, startCol), (endLine, endCol))3Following the GHC API, he end column is the column afterA the end of the error. Lines and columns are 1-based. Returns k- if there is no helpful location information.< "! #'$&%()10-*+,./23456789:;<4:()10-*+,./2#'$&%"! ;567983 >?@@ABCDDEFGHIJKLMNOPQRRSTUVWXYZ[\W]^_`abcdefghijk=lmnopqrstuvwxyz{|}~|}|}|} |                ?     | !""#$%&'()*+,-. /0123456789:;<=>?@ABCDEFGHIJKLM|NOPQRkSTU V!W"X#Y#Z#[\]#^$_%`%a%b&c'd(e(f(g)h*i*j*k+l,m,n-o.p/q/r0s1t1u2v2w2x2y3z3{3|3}4~566677888r88889:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<="hlint-3.1.3-4Kb7A9goybwBOEEgHnGb3qLanguage.Haskell.HLint EmbedData ExtensionFixityGHC.Util.ApiAnnotationGHC.Util.BracketsGHC.Util.DynFlagsGHC.Util.FreeVarsGHC.Util.HsDeclGHC.Util.ModuleGHC.Util.ScopeGHC.Util.SrcLoc GHC.Util.ViewHsColourParallel Paths_hlintRefactGHC.Util.HsExprTimingUtilGHC.Util.UnifyGHC.UtilHSE.All Config.Type Test.ProofIdea Test.UtilTest.TranslateTest.InputOutputReport Hint.Type Hint.Unsafe Hint.Pragma Hint.Pattern Hint.NewType Hint.Naming Hint.Monad Hint.ListRec Hint.List Hint.Lambda Hint.ImportHint.Extensions Hint.ExportHint.Duplicate Hint.Comment Hint.Bracket Hint.Smell Hint.Restrict Hint.MatchHint.All Config.Yaml Config.ReadConfig.ComputeCCConfig.HaskellApplyTest.AnnotationsGrepCmdLineTest.AllHLint FixityInfoModuleEx ParseErrorparseErrorLocationparseErrorMessageparseErrorContents ParseFlagscppFlags baseLanguageenabledExtensionsdisabledExtensionsfixitiesCppFlagsNoCpp CppSimpleCpphsdefaultParseFlagsparseFlagsAddFixitiescreateModuleEx parseModuleExClassifyclassifySeverity classifyHintclassifyModule classifyDeclNoteIncreasesLazinessDecreasesLaziness RemovesError ValidInstanceRequiresExtensionSeverityIgnore SuggestionWarningError ideaModuleideaDecl ideaSeverityideaHintideaSpanideaFromideaToideaNoteideaRefactoringHinthlintgetHLintDataDir autoSettings argsSettingsreadSettingsFile findSettings applyHints unpackSrcSpan hlintYaml defaultYamlreportTemplatedefaultExtensionsconfigExtensionsextensionImpliesextensionImplicationsextensionImpliedEnabledBybase GHC.Generics AssociativityLeftAssociativeRightAssociativeNotAssociative fromFixitySigtoFixity toFixitySigdefaultFixitiescomment commentTextisCommentMultilinepragmasflagslanguagePragmasmkFlagsmkLanguagePragmasisAtom needBracket isAtomOrApp2ghc-lib-parser-ex-8.10.0.11-1rF66khxUENFkejDPwLxnH+Language.Haskell.GhclibParserEx.GHC.Hs.ExprisAnyAppisOpAppisAppBracketsremParenaddParen baseDynFlagsinitGlobalDynFlagsfreeVarsallVarsFreeVarsAllVarsVarsfreeboundvarsvarsspvarsdeclName GHC.MaybeNothingbindNamemodNamefromModuleName'Scope scopeCreate scopeMatch scopeMove possModulesSrcSpanD stripLocs LamConst1App2PApp_PVar_Var_Viewview SimpleLambda fromParenhsColourConsole hsColourHTMLparallelversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileNametoSStoRefactSrcSpan checkRefactor refactorPathrunRefactoringdotApplambdaparendotAppsuniverseParentExpappsfromApps universeAppstransformAppsM rebracket1 appsBracket simplifyExp niceLambdaallowRightSectionallowLeftSection niceLambdaRreplaceBranchesneedBracketOldtransformBracketOld fromParen1timedtimedIO startTimings printTimings forceList exitMessageexitMessageImpuregetContentsUTF8gzipuniverseParentBiunify'Subst fromSubst validSubst removeParens substituteunifyExpSrcSpan5ghc-lib-parser-8.10.1.20200523-9gWyuj7euzZ2Fqg5b3joMlSrcLocsrcSpanStartLine2Language.Haskell.GhclibParserEx.GHC.Driver.SessionparsePragmasIntoDynFlags srcFilenamesrcLine srcColumnsrcSpanFilenamesrcSpanStartLine'srcSpanStartColumnsrcSpanEndLine'srcSpanEndColumn fileToModule showSrcSpan ghcCommentsghcFailOpParseModuleExcontextghcAnnotations ghcModuleparseFlagsSetLanguageparseExpGhcWithModeparseImportDeclGhcWithModeparseDeclGhcWithModeSettingArgumentHintRulehintRuleSeverity hintRuleName hintRuleNotes hintRuleScope6Language.Haskell.GhclibParserEx.GHC.Hs.ExtendInstancesHsExtendInstancesGHC.ShowShow hintRuleLHS hintRuleRHS hintRuleSideSettingInfixSettingClassifySettingMatchExpSettingRestrict SettingSmellBuiltin SmellTypeSmellLongFunctionsSmellLongTypeListsSmellManyArgFunctionsSmellManyImportsRestrict restrictTyperestrictDefault restrictName restrictAsrestrictWithinrestrictBadIdentsrestrictMessage RestrictTypeRestrictModuleRestrictExtension RestrictFlagRestrictFunction getSeveritygetRestrictTypedefaultHintName isUnifyVar showNotes getSmellTypeproof showIdeasJsonshowANSIrawIdearawIdeaNidea ideaRemovesuggest suggestRemovewarnignoreNoSuggestionignoresuggestN withTestsTestaddIdeasgetIdeasprogresspassedfailedtestQuickCheck testTypeCheck matchStartestInputOutput writeReportGHC.BaseMonoid hintModules hintModulehintDecl CrossHintModuHintDeclHint unsafeHint pragmaHint patternHintsingleSimpleField simpleCons dropConsBangDataCon HsSrcBang newtypeHint namingHintmonadExpmonadLet monadHint listRecHintlistHint fromLambdamunge lambdaHint importHintnoDeriveNewtype deriveStockextensionsHint exportHintDupe duplicateHint commentHint bracketHintsmellModuleHint smellHint restrictHint findDecls readMatch HintBuiltin builtinHints resolveHints hintRulesreadFileConfigYaml parseFail ConfigYamlsettingsFromConfigYamlreadFilesConfigcomputeSettings printIssueIssuefromIdea readPragma readComment applyHintFileapplyHintFiles executeHintsparseModuleApplyallHintsclassifytestAnnotationsrunGrepcmdFiles cmdReports cmdGivenHints cmdWithGroupscmdGitcmdColor cmdThreads cmdIgnore cmdShowAll cmdExtension cmdLanguagecmdCross cmdFindHints cmdDataDir cmdDefaultcmdJsoncmdCC cmdNoSummarycmdOnly cmdSerialise cmdRefactorcmdRefactorOptionscmdWithRefactorcmdProof cmdTempDir ColorModeNeverAlwaysAuto cmdHintFiles cmdUseColour resolveFileCmdCmdMainCmdGrepCmdTestcmdPath cmdCppDefine cmdCppInclude cmdCppFile cmdCppSimple cmdCppAnsi cmdNoExitCode cmdTiming cmdIgnoreGlob cmdPattern cmdQuickCheck cmdTypeCheckgetCmd exitWithHelp cmdExtensionscmdCpptestreadAllSettings splitSettings_docs