nx-      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~&Safe(c) Simon Marlow 2003BSD-likehaddock@projects.haskell.org experimentalportableSafeSafeOT(Perform a query on each level of a tree.cThis is stolen directly from SYB package and copied here to not introduce additional dependencies.3Perform a query with state on each level of a tree.This is the same as < but allows for stateful computations. In SYB it is called everythingWithContext& but I find this name somewhat nicer.-Apply transformation on each level of a tree. Just like ", this is stolen from SYB package.Create generic transformation.)Another function stolen from SYB package.:Combine two queries into one using alternative combinator.F(c) Mateusz Kowalczyk 2013, Simon Hengel 2013BSD-likehaddock@projects.haskell.org experimentalportableNone/9;[(c) David Waern 2006-2009BSD-likehaddock@projects.haskell.org experimentalportableNone$9;%Was this signature given by the user?A parent and its childrenpA mapping from the parent (main-binder) to its children and from each child to its grand-children, recursively.A mapping from child to parent-The parents of a subordinate in a declaration A variant of D where the return value from the first computation is not required.#           "     s(c) Simon Marlow 2003-2006, David Waern 2006-2009, Mark Lentczner 2010BSD-likehaddock@projects.haskell.org experimentalportableNoneNone3Mapping from modules to cross-package source paths.This mapping is actually a pair of maps instead of just one map. The reason for this is because when hyperlinking modules in import lists we have no ; available. On the other hand, we can't just use map with r as indices because certain modules may have common name but originate in different packages. Hence, we use both rich and poor versions, where the poor is just projection of rich, one cached in pair for better performance.>Path for making cross-package hyperlinks in generated sources.Used in V to determine whether module originates in current package or in an external package.+ !"#$%&'()*+,-./0123456789:;<=>?@ABCD+ !"#$%&'()*+,-./0123456789:;<=>?@ABCD  !"#$%&'( )*+,-./0123456789:;<=>?@ABCD |(c) Simon Marlow 2003-2006, David Waern 2006-2009, Mateusz Kowalczyk 2013BSD-likehaddock@projects.haskellorg experimentalportableNone !"/0234DRC Haddock's own exception type.EModule\ contains the current module. This way we can distinguish imported and local identifiers.F'Option controlling how to qualify namesGNever qualify any names.HQualify all names fully.I!Qualify all imported names fully.JJLike local, but strip module prefix from modules in the same hierarchy.KUses aliases of module names as suggested by module import renamings. However, we are unfortunately not able to maintain the original qualifications. Image a re-export of a whole module, how could the re-exported identifiers be qualified?#7Source-level options for controlling the documentation.$*This module should not appear in the docs.&Pretend everything is exported.'CNot the best place to get docs for things exported by this module.(*Render enabled extensions for this module.LAn instance origin information.jThis is used primarily in HTML backend to generate unique instance identifiers (for expandable sections).O}The head of an instance. Consists of a class name, a list of kind parameters, a list of type parameters and an instance typePCAn instance head that may have documentation and a source location.MAlmost the same as N except for type binders.In order to perform type specialization for class instances, we need to substitute class variables to appropriate type. However, type variables in associated type are specified using  LHsTyVarBndrs instead of OH. This makes type substitution impossible and to overcome this issue, M type is introduced.PThe three types of instancesQBody (right-hand side)RData constructorsQExtends S" with cross-reference information.RFThis thing is part of the (existing or resulting) documentation. The : is the preferred place in the documentation to refer to.S^This thing is not part of the (existing or resulting) documentation, as far as Haddock knows.TFType of environment used to cross-reference identifiers in the syntax.VArguments and result are indexed by Int, zero-based from the left, because that's the easiest to use when recursing over types.\An exported declaration.]gAn exported entity for which we have no documentation (perhaps because it resides in another package).^A section heading._Some documentation.`$A cross-reference to another module.aA declaration.bcMaybe a doc comment, and possibly docs for arguments (if this decl is a function or type-synonym).c/Subordinate names, possibly with documentation.dEInstances relevant to this declaration, possibly with documentation.eCFixity decls relevant to this declaration (including subordinates).fgWhether the ExportItem is from a TH splice or not, for generating the appropriate type of Source link.hSubordinate names.iSection level (1, 2, 3, ...).jSection id (for hyperlinks).kSection heading text.lA subset of the fields of x' that we store in the interface files.n)The module represented by this interface.o%Textual information about the module.pTDocumentation of declarations originating from the module (including subordinates).r"All names exported by this module.s|All "visible" names exported by the module. A visible name is a name that will show up in the documentation of the module.t=Haddock options for this module (prune, ignore-exports, etc).xxP holds all information used to render a single Haddock page. It represents the  interface of a module. The core business of Haddock lies in creating this structure. Note that the record contains some fields that are only used to create the final record, and that are not used by the backends.z!The module behind this interface.{!Original file name of the module.|%Textual information about the module.}Documentation header.~6Documentation header with cross-reference information.=Haddock options for this module (prune, ignore-exports, etc).Declarations originating from the module. Excludes declarations without names (instances and stand-alone documentation comments). Includes names of subordinate declarations mapped to their parent declarations.TDocumentation of declarations originating from the module (including subordinates).TDocumentation of declarations originating from the module (including subordinates).!All names exported by the module.|All "visible" names exported by the module. A visible name is a name that will show up in the documentation of the module. Aliases of module imports as in import A.B.C as C.!Instances exported by the module.Orphan instancesThe number of haddockable and haddocked items in the module, as a tuple. Haddockable items are the exports and the module itself.+Warnings for things defined in this module._Tokenized source code of module (avaliable if Haddock is invoked with source generation flag). Convert an x to an lTUseful for debuggingUVW !XYZ[\]^_`E"FGHIJK#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNaLbcdOefghiPMjklmnPoQRpqrstuQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~vwxyz{|}~T UVW !XYZ[\]^_`E"FGHIJK#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNaLbcdOefghiPMjklmnPoQRpqrstuQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~vwxyz{|}~DUVW !XYZ[\]^_`E"FGHIJK#$%&'() *+,-./0123456789:;<=>?@ABCDEFGHIJKLMNaLbcdOefghiPMjklmnPoQRpqrstuQRSTUVWXYZ[\]^_`abcdefghijkl mnopqrstuvwxyz{|}~vwxyz{|}~T ((c) Simon Marlow 2006, Isaac Dupree 2009BSD-likehaddock@projects.haskell.org experimentalportableNone"This function is how we read keys.7all fields in the header are optional and have the form spaces1[field name][spaces] ":"textg"n" ([spaces2][space][text]"n" | [spaces]"n")* where each [spaces2] should have [spaces1] as a prefix.Thus for the key  Description, VDescription : this is a rather long description The module comment starts here^the value will be "this is a .. description" and the rest will begin at "The module comment". A(c) Isaac Dupree 2009, Mateusz Kowalczyk 2013BSD-likehaddock@projects.haskell.org experimentalportableNoneTakes a  which (hopefully) contains all the definitions and a parsed comment and we attempt to make sense of where the identifiers in the comment point to. We're in effect trying to convert s to SNs, with some guesswork and fallbacks in case we can't locate the identifiers.=See the comments in the source for implementation commentary.>Wrap an identifier that's out of scope (i.e. wasn't found in GlobalReaderEnv during -) in an appropriate doc. Currently we simply monospace the identifier in most cases except when the identifier is qualified: if the identifier is qualified then we can still try to guess and generate anchors accross modules but the users shouldn't rely on this doing the right thing. See tickets 253 and H375 on the confusion this causes depending on which default we pick in . F(c) Simon Marlow 2003-2006, David Waern 2006-2009BSD-likehaddock@projects.haskell.org experimentalportableNone!";9 None!":OT Binding generation monad.Renaming monad. Haskell AST type representation.WThis type is used for renaming (more below), essentially the ambiguous (!) version of S. So, why is this  instead of ? Well, it was  before, but turned out that U sometimes also contains namespace information, differentiating visually same types.And  is used because it is visual part of  - it is not converted to P or alike to avoid new allocations. Additionally, since it is stored mostly in , fast comparison of  is also quite nice.?Instantiate all occurrences of given name with particular type.DInstantiate all occurrences of given names with corresponding types.+It is just a convenience function wrapping - that supports more that one specialization.3Instantiate given binders with corresponding types.0Again, it is just a convenience function around M. Note that length of type list should be the same as the number of binders.oMake all details of instance head (signatures, associated types) specialized to that particular instance type.>Make given type use tuple and list literals where appropriate.After applying \ function some terms may not use idiomatic list and tuple literals resulting in types like [] a or  (,,) a b c. This can be fixed using * function, that will turn such types into [a] and  (a, b, c).&Compute arity of given tuple operator.parseTupleArity "(,,)"Just 3parseTupleArity "(,,,,)"Just 5parseTupleArity "abc"NothingparseTupleArity "()"Nothing,Compute set of free variables of given type.%Make given type visually unambiguous.After applying W method, some free type variables may become visually ambiguous - for example, having a -> b and specializing a to (a -> b) we get  (a -> b) -> b where first occurrence of b> refers to different type variable than latter one. Applying Z function will fix that type to be visually unambiguous again (making it something like  (a -> c) -> b).?Generate fresh occurrence name, put it into context and return.*      !'      !(c) Isaac Dupree 2009,BSD-likehaddock@projects.haskell.org experimentalportableNone"^normal situation. This is the safe one to use if you don't quite understand what's going on.#sbeginning of a function definition, in which, to make it look less ugly, those rank-1 foralls are made implicit.$Jbecause in class methods the context is added to the type (e.g. adding forall a. Num a => to (+) :: a -> a -> a) which is rather sensible, but we want to restore things to the source-syntax situation where the defining class gets to quantify all its functions for free!%3Turn type constructors into type class declarations&"#$'()%*+,-./0123456789:;&#$"'()%*+,-./0123456789:;&"#$'()%*+,-./0123456789:;h(c) Simon Marlow 2006, David Waern 2006-2009, Isaac Dupree 2009BSD-likehaddock@projects.haskell.org experimentalportableNoneB<Simplified type for sorting types, ignoring qualification (not visible in Haddock output) and unifying special tycons with normal ones. For the benefit of the user (looks nice and predictable) and the tests (which prefer output to be deterministic).={Like GHC's getInfo but doesn't cut things out depending on the interative context, which we don't set sufficiently anyway.>"A class or data type is hidden iff<it is defined in one of the modules that are being processed/and it is not exported by any non-hidden module?ZWe say that an instance is hidden iff its class or any (part) of its type(s) is hidden.<@ABCDEFGH=IJKLMN>?OE<@ABCDEFGH=IJKLMN>?OA(c) Simon Marlow 2003-2006, David Waern 2006BSD-likehaddock@projects.haskell.org experimentalportableNonePQRSTUPQRPQRSTU(c) The University of Glasgow 2001-2002, Simon Marlow 2003-2006, David Waern 2006-2009BSD-likehaddock@projects.haskell.org experimentalportableNoneV3Print a message to stdout, if it is not too verboseW%Extract a module's short description.X%Extract a module's short description.Y^Takes an arbitrary string and makes it a valid anchor ID. The mapping is identity preserving.ZThe identity markup4[Vprogram verbositymessage verbosityWX\]^_`abcdefghijklmnopqrYstuvwxyz{|}~Z)[VWX\]^_`eghijklmnopqrYstuvwxyzZ4[VWX\]^_`abcdefghijklmnopqrYstuvwxyz{|}~Zs(c) Simon Marlow 2003-2006, David Waern 2006-2009, Mark Lentczner 2010BSD-likehaddock@projects.haskell.org experimentalportableNone 9Replace placeholder string elements with provided values.KUsed to generate URL for customized external paths, usually provided with --source-module, --source-entity$ and related command-line arguments.BspliceURL Nothing mmod mname Nothing "output/%{MODULE}.hs#%{NAME}""output/Foo.hs#foo"Same as  but takes  instead of .Concatenate a series of / values vertically, with linebreaks in between. Join two 5 values together with a linebreak in between. Has  as left identity.Promoted type quote (e.g. '[a, b],  '(a, b, c)).Generate a named anchor)generate an anchor identifier for a group,Attributes for an area that can be collapsed4Attributes for an area that toggles a collapsed areaNAttributes for an area that toggles a collapsed area, and displays a control.!!88None s(c) Simon Marlow 2003-2006, David Waern 2006-2009, Mark Lentczner 2010BSD-likehaddock@projects.haskell.org experimentalportableNoneIndicator of how to render a Q into  Render as-is.Render using infix notation.Render using prefix notation.:Render a name depending on the selected qualification modeNone F(c) Simon Marlow 2010, Mateusz Kowalczyk 2013BSD-likehaddock@projects.haskell.org experimentalportableNone!"OPrint a possibly commented instance. The instance header is printed inside an argBoxJ. The comment is printed to the right of the box in normal comment style.oPrint the LHS of a data/newtype declaration. Currently doesn't handle 'data instance' decls or kind signaturesIPrint an application of a DocName and two lists of HsTypes (kinds, types)5Print an application of a DocName and a list of Names%General printing of type applicationsy      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXv      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXX4s(c) Simon Marlow 2003-2006, David Waern 2006-2009, Mark Lentczner 2010BSD-likehaddock@projects.haskell.org experimentalportableNoneY5We use this intermediate type to transform the input Ny tree in an arbitrary way before rendering, such as grouping some elements. This is effectivelly a hack to prevent the Ng type from changing if it is possible to recover the layout information we won't need after the fact.ZGroup things under bold  s together.[Remove top-level  s turning them into a flat list. This lends itself much better to processing things in order user might look at them, such as in Z.\8Generate the markup needed for collapse to happen. For ] and ^7 we do nothing more but extract/append the underlying N and convert it to . For _(, we attach extra info to the generated 0 that allows us to expand/collapse the content.` Goes through \ to generate the # rather than skipping straight to C: this allows us to employ XHtml specific hacks to the tree first.aSame as b but it doesn't insert the cG element in links. This is used to generate the Contents box elements.Y]_^dZZCounter for header IDs which serves to assign unique identifiers within the comment scopeIt is not enough to have unique identifier within the scope of the comment: if two different comments have the same ID for headers, the collapse/expand behaviour will act on them both. This serves to make each header a little bit more unique. As we can't export things with the same names, this should work more or less fine: it is in fact the implicit assumption the collapse/expand mechanism makes for things like Instances  boxes.[\e`b4Name of the thing this doc is for. See comments on Z for details.aSee Zfghi!Name of the thing this doc is forj!Name of the thing this doc is forkbafghijY]_^dZ[\e`bafghijks(c) Simon Marlow 2003-2006, David Waern 2006-2009, Mark Lentczner 2010BSD-likehaddock@projects.haskell.org experimentalportableNonelMake an element that always has at least something (a non-breaking space). If it would have otherwise been empty, then give it the class ".empty".m-Sub table with source information (optional).n9Generate sub table for instance declarations, with sourceoxAdds a source and wiki link at the right hand side of the box. Name must be documented, otherwise we wouldn't get here.)pqrsltuvwxyz{|}~mn&Class name, used for anchor generation*Instance unique id (for anchor generation)'Header content (instance name and type)*Instance unique id (for anchor generation)Associated type contents+Method contents (pretty-printed signatures)*Instance unique id (for anchor generation)Type or data family instance*Instance unique id (for anchor generation)o pqsltuvwxyz{|}~n)pqrsltuvwxyz{|}~mnos(c) Simon Marlow 2003-2006, David Waern 2006-2009, Mark Lentczner 2010BSD-likehaddock@projects.haskell.org experimentalportableNone!"GOTPretty-print type variables.%Print a type family and its variables/Print a newtype / data binder and its variablesPrint an application of a Q and two lists of HsTypes (kinds, types)Print an application of a Q and a list of Names%General printing of type applicationsoPrint the LHS of a data/newtype declaration. Currently doesn't handle 'data instance' decls or kind signaturesOIs instance orphanNormalOK(c) David Waern 2006-2009, Mateusz Kowalczyk 2013BSD-likehaddock@projects.haskell.org experimentalportableNoneOTRead a Haddock (.haddock$) interface file. Return either an  or an error message.\This function can be called in two ways. Within a GHC session it will update the use and update the session's name cache. Outside a GHC session a new empty name cache is used. The function is therefore generic in the monad being used. The exact monad is whichever monad the first argument, the getter and setter of the name cache, requires.+ "|(c) Simon Marlow 2003-2006, David Waern 2006-2009, Mateusz Kowalczyk 2013BSD-likehaddock@projects.haskell.org experimentalportableNoneLike  listToMaybe3 but returns the last element instead of the first.E     C     /     (c) Mark Lentczner 2010BSD-likehaddock@projects.haskell.org experimentalportableNone-Find a theme by name (case insensitive match)Standard theme used by default=Default themes that are part of Haddock; added with --default-themes The first theme in this list is considered the standard theme. Themes are "discovered" by scanning the html sub-dir of the libDir, and looking for directories with the extension .theme or .std-theme. The later is, obviously, the standard theme.%Build a theme from a single .css file Build a theme from a directory!!Check if we have a built in theme"Find a built in theme#+Process input flags for CSS Theme arguments$%&'()*+ !"#,-./01234&#01$%&'()*+ !"#,-./01234(c) Simon Marlow 2003-2006, David Waern 2006-2009, Mark Lentczner 2010, Mateusz Kowalczyk 2013BSD-likehaddock@projects.haskell.org experimentalportableNone5 TitlePackageDestination directoryPrologue text, maybeThemesThe mathjax URL (--mathjax)The source URL (--source) The wiki URL (--wiki) !The contents URL (--use-contents) The index URL (--use-index) 0Whether to use unicode in output (--use-unicode) How to qualify names+Output pretty html (newlines and indenting)6789:;<=> How to qualify names?@ABCDEFGHIJKOrphans sectionsLMNOPQRS56>C56789:;<=>?@ABCDEFGHIJKLMNOPQRSNone!"T6Group consecutive tokens pointing to the same element.EWe want to render qualified identifiers as one entity. For example,  Bar.Baz.foo consists of 5 tokens (Bar, ., Baz, ., foo) but for better user experience when highlighting and clicking links, these tokens should be regarded as one identifier. Therefore, before rendering we must group consecutive elements pointing to the same SD (note that even dot token has it if it is part of qualified name).UVWXYTZ[\]^_`abcdefghijkYUVWXYTZ[\]^_`abcdefghijkNone lATurn source code string into a stream of more descriptive tokens.xResult should retain original file layout (including comments, whitespace, etc.), i.e. the following "law" should hold:  concat . map A . l = idm2Split raw source string to more meaningful chunks.This is the initial stage of tokenization process. Each chunk is either a comment (including comment delimiters), a whitespace string, preprocessor macro (and all its content until the end of a line) or valid Haskell lexeme.nBA bit better lexer then the default, i.e. handles DataKinds quoteso6Split input to "first line" string and the rest of it.)Ideally, this should be done simply with p (== '\n'). However, Haskell also allows line-unbreaking (or whatever it is called) so things are not as simple and this function deals with that.qXSplit input to whitespace string, (optional) preprocessor directive and the rest of it.Again, using something like r sB would be nice to chunk input to whitespace. The problem is with # symbol - if it is placed at the very beginning of a line, it should be recognized as preprocessor macro. In any other case, it is ordinary Haskell symbol and can be used to declare operators. Hence, while dealing with whitespace we also check whether there happens to be #v symbol just after a newline character - if that is the case, we begin treating the whole line as preprocessor macro.tCSplit input to comment content (including delimiters) and the rest.#Again, some more logic than simple r8 is required because of Haskell comment nesting policy.u6Assign source location for each chunk in given stream.v@Turn unrecognised chunk stream to more descriptive token stream.w3Classify given string as appropriate Haskell token.JThis method is based on Haskell 98 Report lexical structure description: 1https://www.haskell.org/onlinereport/lexemes.htmloHowever, this is probably far from being perfect and most probably does not handle correctly all corner cases.lmnoqtuvwxyz{|llmnoqtuvwxyz{| None !"DORT}VA map containing association between source locations and "details" of this location.For the time being, it is just a list of pairs. However, looking up things in such structure has linear complexity. We cannot use any hashmap-like stuff because source locations are not ordered. In the future, this should be replaced with interval tree data structure.~<Add more detailed information to token stream using GHC API.?Obtain details map for variables ("normally" used identifiers).Obtain details map for types.+Obtain details map for identifier bindings.That includes both identifiers bound by pattern matching or declared using ordinary assignment (in top-level declarations, let-expressions and where clauses)..Obtain details map for top-level declarations.+Obtain details map for import declarations.WThis map also includes type and variable details for items in export and import lists.8Check whether token stream span matches GHC source span.Currently, it is implemented as checking whether "our" span is contained in GHC span. The reason for that is because GHC span are generally wider and may spread across couple tokens. For example, (>>=) consists of three tokens: (, >>=, )&, but GHC source span associated with >>= variable contains ( and )(. Similarly, qualified identifiers like  Foo.Bar.quux are tokenized as Foo, ., Bar, ., quux& but GHC source span associated with quux contains all five elements. }~~ }~!|(c) Simon Marlow 2003-2006, David Waern 2006-2009, Mateusz Kowalczyk 2013BSD-likehaddock@projects.haskell.org experimentalportableNoneL[Use a  to produce an xj. To do this, we need access to already processed modules in the topological sort. That's what's in the |.Create  by looping through the declarations. For each declaration, find its names, its subordinates, and its doc strings. Process doc strings into Ns.FGet all subordinate declarations inside a declaration, and their docs.1Extract function argument docs from inside types.|All the sub declarations of a class (that we handle), ordered by source location, with documentation attached if it exists.The top-level declarations of a module that we care about, ordered by source location, with documentation attached if it exists.)Extract a map of fixity declarations onlyATake all declarations except pragmas, infix decls, rules from an .bTake a field of declarations from a data structure and create HsDecls using the given constructorSort by source location7Filter out declarations that we don't handle in HaddockCGo through all class declarations and filter their sub-declarations7Collect docs and attach them to the right declarations.Build the list of items that will become the documentation, from the export list. At this point, the list of ExportItems is in terms of original names.We create the export items even if the module is hidden, since they might be useful when creating the export items for other modules.This function is called for top-level bindings without type signatures. It gets the type signature from GHC and that means it's not going to have a meaningful . So we pass down + for the declaration and use it instead - nLoc here.(Lookup docs for a declaration from maps.Return all export items produced by an exported module. That is, we're interested in the exports produced by "module B" in such a scenario: 5module A (module B) where import B (...) hiding (...),There are three different cases to consider:1) B is hidden, in which case we return all its exports that are in scope in A. 2) B is visible, but not all its exports are in scope in A, in which case we only return those that are. 3) B is visible and all its exports are in scope, in which case we return a single ` item.Sometimes the declaration we want to export is not the "main" declaration: it might be an individual record selector or a class method. In these cases we have to extract the required declaration (and somehow cobble together a type signature for it...).Keep export items with docs.5Find a stand-alone documentation comment by its name.# Module A'The real name of B, the exported module"The flags used when typechecking A#The renaming environment used for AAll the exports of AAll the declarations in AAlready created interfacesInterfaces in other packages Locations of all TH splices Resulting export items#"|(c) Simon Marlow 2003-2006, David Waern 2006-2010, Mateusz Kowalczyk 2013BSD-likehaddock@projects.haskell.org experimentalportableNoneCreate xzs and a link environment by typechecking the list of modules using the GHC API and processing the resulting syntax trees.:Build a mapping which for each original name, points to the "best" place to link to in the documentation. For the definition of "best", we use "the module nearest the bottom of the dependency graph which exports this name", not including hidden modules. When there are multiple choices, we pick a random one.uThe interfaces are passed in in topologically sorted order, but we start by reversing the list so we can do a foldl.Verbosity of logging to stdout9A list of file or module names sorted by module topologyCommand-line flags'Interface files of package dependencies6Resulting list of interfaces and renaming environment#None1Generate hyperlinked source for given interfaces.Note that list of interfaces should also contain interfaces normally hidden when generating documentation. Otherwise this could lead to dead links in produced source.5Generate hyperlinked source for particular interface.%Name of CSS file in output directory.:Name of highlight script in output and resource directory.Path to default CSS file.Output directoryResource directoryCustom CSS file path,Flag indicating whether to pretty-print HTMLPaths to sources%Interfaces for which we create source8 !"#$%&'()*+,-./0123456789:;<=>?@ABCD$(c) Neil Mitchell 2006-2008BSD-likehaddock@projects.haskell.org experimentalportableNone%for constructors, and named-fields... Just like $ but uses '($+$)' instead of '($$)'.+&%(c) Simon Marlow 2003BSD-likehaddock@projects.haskell.org experimentalportableSafe&r(c) Simon Marlow 2003-2006, David Waern 2006-2010, Mateusz Kowalczyk 2014BSD-likehaddock@projects.haskell.org experimentalportableNoneOT[oEither returns normally or throws an ExitCode exception; all other exceptions are turned into exit exceptions.)Run Haddock with given list of arguments.8Haddock's own main function is defined in terms of this: main = getArgs >>= haddock1Create warnings about potential misuse of -optghcFRender the interfaces with whatever backend is specified in the flags.TFrom GHC 7.10, this function has a potential to crash with a nasty message such as expectJust getPackageDetails because package name and versions can no longer reliably be extracted in all cases: if the package is not installed yet then this info is no longer available. The --package-name and --package-version Haddock flags allow the user to specify this information and it is returned here if present: if it is not present, the error will occur. Nasty but that's how it is for now. Potential TODO.kStart a GHC session with the -haddock flag set. Also turn off compilation and linking. Then run the given  action.1Generate some warnings about potential misuse of --hyperlinked-source.uHaddock flags are checked as they may contain the package name or version provided by the user which we prioritise(c) David Waern 2010BSD-likehaddock@projects.haskellorg experimentalportableNoneCreate xf structures from a given list of Haddock command-line flags and file or module names (as accepted by m executable). Flags that control documentation generation or show help or version information are ignored.A list of command-line flagsFile or module namesResulting list of interfaces  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~xyz{|}~lmnopqrstuv[\]^_`abcdefghijkUVTQRSPONM     456789:;<=>?@ABCDEFGHIJKLWXYZ"w)*+,-./0123#$%&'( !'()'(*'(+'(,'(,'(-'(.'(/'(/'(0'(1'(2'(3'(4'(5'(6'(7'(8'(9'(:'(;'(<'(='(>'(?'(@'(A'(B'(C'(D'(E'(F G G H I J K L M N O O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | | } ~              "&&&&      !"#$%&'()*+,-./0123456789:;<<<=>?@ABCDEFGGHIJKLMNOPQRSTUVWXXYZ[[\]^^_`abc d e f g h i j k lmnop q r stt u v w x y z { | } ~        t     l                                               '('('('('('('('('('('('('('('('('(                                                                                ! ! " # $ % & ' ( ) * + , -   . / 0 1 2 3 4 5 6 7 8 9 : ;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYVZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~''''''''      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ 124536%&'+,-./089:;<=>?@ABCDEFGHIJ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLJMNOPQRSTUVWX Y Z [ \ ] ^ _ ` a b!cde!f!g!h!i!j!k!l!mmn!o!p!q!r!s!t!uvw!x!y!z!{!|!}!~!!!!!!!!!!!!"""""#####$$$$$$$$$$$$$$$$$o$$$$$$$$$$$$$$$$$$$$$$$$$$%&&&3&&&&&&&&&&&&&)haddock-api-2.17.4-2oc6jdou1s23DzKuE5Kc7xDocumentation.HaddockPaths_haddock_apiHaddock.Version Haddock.SybHaddock.ParserHaddock.GhcUtilsHaddock.Backends.Xhtml.Types"Haddock.Backends.Hyperlinker.Types Haddock.Types#Haddock.Interface.ParseModuleHeaderHaddock.Interface.LexParseRnHaddock.Interface.RenameHaddock.Interface.SpecializeHaddock.Convert!Haddock.Interface.AttachInstancesHaddock.ModuleTree Haddock.UtilsHaddock.Backends.Xhtml.Utils"Haddock.Backends.Hyperlinker.UtilsHaddock.Backends.Xhtml.Names Haddock.DocHaddock.Backends.LaTeX Haddock.Backends.Xhtml.DocMarkupHaddock.Backends.Xhtml.LayoutHaddock.Backends.Xhtml.DeclHaddock.InterfaceFileHaddock.OptionsHaddock.Backends.Xhtml.ThemesHaddock.Backends.Xhtml%Haddock.Backends.Hyperlinker.Renderer#Haddock.Backends.Hyperlinker.Parser Haddock.Backends.Hyperlinker.AstHaddock.Interface.CreateHaddock.InterfaceHaddock.Backends.HyperlinkerHaddock.Backends.HoogleHaddock.Backends.HaddockDBHaddock+haddock-library-1.4.3-JbTvLSEdh1LEWm8KMmBVQDocumentation.Haddock.TypesDocH hyperlinkUrlhyperlinkLabel Hyperlink exampleResultexampleExpressionExample DocWarningDocUnorderedList DocString DocPropertyDocPic DocParagraphDocOrderedList DocMonospaced DocModule DocMathInlineDocMathDisplayDocIdentifierUnchecked DocIdentifier DocHyperlink DocHeader DocExamplesDocEmpty DocEmphasis DocDefList DocCodeBlockDocBold DocAppendDocANameHaddockExceptionAliasMap DocOptionOptHideOptPruneOptIgnoreExports OptNotHomeOptShowExtensionsHaddockModInfohmi_description hmi_copyright hmi_licensehmi_maintainer hmi_stabilityhmi_portability hmi_safety hmi_languagehmi_extensions DocMarkupMarkup markupEmpty markupStringmarkupParagraph markupAppendmarkupIdentifiermarkupIdentifierUnchecked markupModule markupWarningmarkupEmphasis markupBoldmarkupMonospacedmarkupUnorderedListmarkupOrderedList markupDefListmarkupCodeBlockmarkupHyperlink markupAName markupPicmarkupMathInlinemarkupMathDisplaymarkupProperty markupExample markupHeaderMDocDocInstHead DocInstanceDocName Documented UndocumentedLinkEnv DocForDecl FnArgsDoc DocumentationdocumentationDocdocumentationWarning ExportItem ExportDecl ExportNoDecl ExportGroup ExportDoc ExportModule expItemDecl expItemMbDocexpItemSubDocsexpItemInstancesexpItemFixitiesexpItemSpliced expItemName expItemSubsexpItemSectionLevelexpItemSectionIdexpItemSectionTextInstalledInterfaceinstModinstInfo instDocMap instArgMap instExportsinstVisibleExports instOptions instSubMap instFixMap WarningMap InterfaceifaceModifaceOrigFilename ifaceInfoifaceDoc ifaceRnDoc ifaceOptions ifaceDeclMap ifaceDocMap ifaceArgMap ifaceRnDocMap ifaceRnArgMap ifaceSubMap ifaceFixMapifaceExportItemsifaceRnExportItems ifaceExportsifaceVisibleExportsifaceModuleAliasesifaceInstancesifaceFamInstancesifaceOrphanInstancesifaceRnOrphanInstancesifaceHaddockCoverageifaceWarningMapifaceTokenizedSrcArgMapDocMaptoInstalledIfacemarkupNameCacheAccessor InterfaceFile ifLinkEnvifInstalledIfacesnameCacheFromGhcfreshNameCachereadInterfaceFileFlagFlag_BuiltInThemesFlag_CSSFlag_ReadInterfaceFlag_DumpInterface Flag_Heading Flag_Html Flag_HoogleFlag_LibFlag_OutputDir Flag_PrologueFlag_SourceBaseURLFlag_SourceModuleURLFlag_SourceEntityURLFlag_SourceLEntityURLFlag_WikiBaseURLFlag_WikiModuleURLFlag_WikiEntityURL Flag_LaTeXFlag_LaTeXStyleFlag_HyperlinkedSourceFlag_SourceCss Flag_Mathjax Flag_HelpFlag_Verbosity Flag_Version Flag_CompatibleInterfaceVersionsFlag_InterfaceVersionFlag_UseContentsFlag_GenContents Flag_UseIndex Flag_GenIndexFlag_IgnoreAllExportsFlag_HideModuleFlag_ShowExtensions Flag_OptGhcFlag_GhcLibDirFlag_GhcVersionFlag_PrintGhcPathFlag_PrintGhcLibDirFlag_NoWarningsFlag_UseUnicodeFlag_NoTmpCompDirFlag_QualificationFlag_PrettyHtmlFlag_NoPrintMissingDocsFlag_PackageNameFlag_PackageVersionprocessModuleshaddockhaddockWithGhcwithGhc getGhcDirscreateInterfacescatchIOversionbindirlibdir dynlibdirdatadir libexecdir sysconfdir getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName projectName projectUrlprojectVersion everythingeverythingWithState everywheremkTcombine parseParas parseString parseIdent isUserLSigfamilyfamilies parentMapparents gbracket_ghc ExceptiongbracketParentchildren moduleString isNameSymisVarSymisConSymgetMainDeclBinder getInstLocfilterLSigNamesfilterSigNames ifTrueJustsigName sigNameNoLocisClassDisValDdeclATsprettyunLreL familyConDeclmodifySessionDynFlags minimalDef setObjectDirsetHiDir setStubDir setOutputDir$fParentTyClDecl$fParentConDecl$fNamedThingTyClDeclUnicodeSplice LinksInfoWikiURLs SourceURLsSrcMapModule ModuleNameSrcPath SrcExternalSrcLocal TokenDetailsRtkVarRtkTypeRtkBindRtkDecl RtkModule RichTokenrtkToken rtkDetails TokenType TkIdentifier TkKeywordTkStringTkCharTkNumber TkOperatorTkGlyph TkSpecialTkSpace TkCommentTkCppTkPragma TkUnknownSpanspStartspEndPositionposRowposColTokentkTypetkValuetkSpanrtkNamemkSrcMap AliasedQual QualOption OptNoQual OptFullQual OptLocalQualOptRelativeQualOptAliasedQual InstOriginPseudoFamilyDeclHsDecls FamilyDeclHsTypesHsTypeInstTypeTypeInstDataInstName$fOutputableDocName ErrMsgGhc WriterGhc runWriterGhcErrMsgMWriter runWriterErrMsg QualificationNoQualFullQual LocalQual RelativeQualLDoc OriginClass OriginData OriginFamily ihdClsNameihdKindsihdTypes ihdInstTypepfdInfopfdLName pfdTyVars pfdKindSig ClassInstclsiCtx clsiTyVarsclsiSigs clsiAssocTysSetNamesetNameDocPathsFixMapInstMapDeclMapSubMap InstIfaceMapIfaceMap noDocForDeclmkPseudoFamilyDeclexampleToStringemptyHaddockModInfomakeContentsQualmakeModuleQualtellthrowEliftGhcToErrMsgGhc liftErrMsg$fMonadErrMsgGhc$fApplicativeErrMsgGhc$fFunctorErrMsgGhc$fExceptionHaddockException$fShowHaddockException$fMonadErrMsgM$fApplicativeErrMsgM$fFunctorErrMsgM$fNFDataExample$fNFDataPicture$fNFDataHyperlink$fNFDataHeader $fNFDataDocH$fNamedThingInstOrigin$fOutputableInstType$fSetNameDocName $fSetNameName$fOutputableBndrDocName$fNamedThingDocName BasicTypesFixityHsDoc HsDocString LHsDocStringVersionMetaDoc_doc_metaPicture pictureTitle pictureUriMeta_versionHeader headerLevel headerTitleoverDocparseKeyparseModuleHeaderrenameRdrName GlobalRdrEnv outOfScopeprocessDocStringsprocessDocStringParasprocessDocStringprocessModuleHeaderRnMunRnrenameInterfacereturnRnthenRn getLookupRnoutRnlookupRnrunRnFMrenameLrenameExportItemsrenameDocForDeclrenameDocumentationrenameLDocHsSyn renameDocrenameFnArgsDoc renameLTyperenameLSigTyperenameLSigWcType renameLKindrenameMaybeLKindrenameFamilyResultSigrenameInjectivityAnnrenameMaybeInjectivityAnn renameTyperenameLHsQTyVarsrenameLTyVarBndrrenameLContextrenameWildCardInforenameInstHead renameLDecl renameDecl renameLThing renameTyClDrenameFamilyDeclrenamePseudoFamilyDeclrenameFamilyInforenameDataDefn renameConrenameConDeclFieldFieldrenameLFieldOcc renameSig renameForD renameInstDrenameClsInstDrenameTyFamInstDrenameLTyFamInstEqnrenameLTyFamDefltEqnrenameDataFamInstDrenameImplicitrenameWcrenameDocInstancerenameExportItem renameSub$fApplicativeRnM $fFunctorRnM $fMonadRnMRebindRenameNameRep FastStringOccNamebaseGHC.BaseStringcontainers-0.5.7.1 Data.Set.BaseSet specialize specialize'specializeTyVarBndrsspecializeInstHeadsugarparseTupleArity freeVariables freshName RenameEnvrneFVrneCtxspecializePseudoFamilyDecl specializeSig sugarLists sugarTuplessugarOperators getNameRep nameRepString stringNameRepsetInternalNameRepsetInternalOccName renameLTypes renameContext renameNamerebindrebindLTyVarBndrsrebindTyVarBndr rebindName reuseName takenNames findFreshNamealternativeNamesalternativeNames'located tyVarName WithinTypeImplicitizeForAllDeleteTopLevelQuantification synifyTyConSynifyTypeStatetyThingToLHsDeclsynifyAxBranch synifyAxiomsynifyInjectivityAnnsynifyFamilyResultSig synifyDataCon synifyName synifyIdSig synifyTcIdSig synifyCtx synifyTyVars synifyTyVar synifySigTypesynifySigWcTypesynifyPatSynSigType synifyTypesynifyPatSynType synifyTyLit synifyKindSigsynifyInstHead synifyFamInst SimpleType getAllInfo isNameHiddenisInstanceHidden SimpleTyLit ExportInfoModules ExportedNamesattachInstancesattachOrphanInstancesattachToExportItem instLookupinstHeadargCountsimplifysimplify_maybeinstFam funTyConName isTypeHidden ModuleTreeNode mkModuleTree addToTrees mkSubTree splitModuleout toDescriptiontoInstalledDescription makeAnchorIdidMarkupparseVerbositymkMetamkEmptySigWcTypeaddClassContextlHsQTyVarsToTypes restrictTorestrictDataDefn restrictCons restrictDecls restrictATs emptyHsQTvsbaseNamemoduleHtmlFilemoduleHtmlFile'contentsHtmlFile indexHtmlFilemoduleIndexFrameName mainFrameNamesynopsisFrameNamesubIndexHtmlFile moduleUrl moduleNameUrlmoduleNameUrl' nameAnchorIdjsFilegetProgramNamebyedieMsgnoDieMsgmapSnd mapMaybeM escapeStr escapeURICharescapeURIString isUnreserved isAlphaChar isDigitCharisAlphaNumCharhtml_xrefs_refhtml_xrefs_ref' html_xrefs html_xrefs'replacespanWith markupPair getProcessID System.ExitdieControl.Monad.IO.ClassMonadIOliftIO spliceURL spliceURL'vcatxhtml-3000.2.1Text.XHtml.InternalsHtml<=>noHtml promoQuote namedAnchorgroupIdcollapseSectioncollapseTogglecollapseControlrenderToStringhsep<+>keywordequalscommacharquoteparensbrackets pabracketsbraces punctuate parenList ubxParenList ubxparensdcolonarrowdarrow forallSymboldot linkedAnchorpick hypSrcDirhypSrcModuleFilehypSrcModuleFile'hypSrcModuleUrlhypSrcModuleUrl' hypSrcNameUrl hypSrcLineUrlhypSrcModuleNameUrlhypSrcModuleLineUrlhypSrcModuleUrlFormathypSrcModuleNameUrlFormathypSrcModuleLineUrlFormat moduleFormat nameFormat lineFormatNotationRawInfixPrefix ppQualifyName ppOccName ppRdrNameppIPNameppUncheckedLink ppLDocName ppDocNameppFullQualName ppQualNameppNameppBinder ppBinderInfix ppBinderWith ppBinder' wrapInfixlinkId linkIdOcc linkIdOcc'ppModule ppModuleRefcombineDocumentation docCodeBlockDocumentation.Haddock.Doc metaDocConcat metaDocAppend metaConcat metaAppend emptyMetaDoc docParagraph docConcat docAppend ppDocInstance ppDataHeaderppAppNameTypesppAppDocNameNames ppTypeApp StringContextPlainVerbMonoLaTeXppLaTeX haddockSty ppLaTeXTop ppLaTeXModule string_txtexportListItemprocessExports isSimpleSigisExportModule processExport ppDocGroup declNames forSummarymoduleLaTeXFilemoduleBasenameppDeclppTyFamppForppTySynppFunSig ppLPatSigppTypeOrFunSig ppTypeSigppTyVars tyvarNames declWithDoc multiDeclmaybeDocrDoc ppClassHdrppFds ppClassDeclppDocInstancesisUndocdInstance ppInstDecl ppInstHeadlookupAnySubdoc ppDataDecl ppConstrHdrppSideBySideConstrppSideBySideField ppLContextppLContextNoArrowppContextNoLocsMaybeppContextNoArrowppContextNoLocs ppContext pp_hs_contextppBang tupleParenspREC_TOPpREC_FUNpREC_OPpREC_CON maybeParenppLType ppLParendType ppLFunLhTypeppType ppParendType ppFunLhTypeppLKindppKind ppr_mono_lty ppr_mono_ty ppr_tylit ppr_fun_ty isInfixName ppSymName ppVerbOccName ppVerbDocName ppVerbRdrName ppDocBinder latexFilterlatexMonoFilter latexMungelatexMonoMungeparLatexMarkup latexMarkuprdrLatexMarkup docToLaTeXdocumentationToLaTeX rdrDocToLaTeXlatexStripTrailingWhitespace itemizedListenumeratedListdescriptionListttdeclttemphboldverbnl<->HacktoHackflatten hackMarkup UntouchedDoc HackAppendCollapsingHeader markupHackeddocToHtmlNoAnchors docToHtmlText.XHtml.Strict.Elementsanchor parHtmlMarkup renderMeta origDocToHtml rdrDocToHtml docElement docSection docSection_cleanupnonEmptySectionName subTableSrc subInstanceslinksSubDeclminiBody sectionDiv sectionNamedivPackageHeader divContentdivModuleHeader divFooterdivTableOfContentsdivDescription divSynopsis divInterfacedivIndex divAlphabet divModuleList shortDeclList shortSubDecls divTopDecl divSubDeclssubDlistsubTablesubBlock subArgumentssubAssociatedTypessubConstructors subFields subEquationssubOrphanInstances subInstHeadsubInstDetailssubFamInstDetailssubInstSection instAnchorId subMethods subMinimaldeclElem topDeclElemppFamDeclBinderWithVarsppDataBinderWithVars ppLFunSig ppSigLikeppForAll ppFixitiesppTyName ppSimpleSig ppFamilyInfo ppTyFamHeader ppResultSigppPseudoFamilyHeaderppInjectivityAnnppPseudoFamilyDecl ppAssocTypeppAppDocNameTyVarBndrs ppHsContextppShortClassDecl ppInstancesppOrphanInstancesppInstanceAssocTysppInstanceSigs instanceIdppShortDataDecl ppShortConstrppShortConstrParts ppShortFieldpREC_CTX ppCtxType ppHsTyVarBndr ppForAllPart OnDiskName BinDictionary bin_dict_next bin_dict_mapBinSymbolTablebin_symtab_nextbin_symtab_mapifModuleifUnitIdbinaryInterfaceMagicbinaryInterfaceVersion#binaryInterfaceVersionCompatibilityinitBinMemSizewriteInterfaceFileputName putFastStringputSymbolTablegetSymbolTablefromOnDiskName serialiseName$fBinaryDocName$fBinaryHaddockModInfo $fBinaryDocH$fBinaryMetaDoc $fBinaryMeta$fBinaryHeader$fBinaryPicture$fBinaryHyperlink$fBinaryExample$fBinaryDocOption$fBinaryInstalledInterface$fBinaryInterfaceFile $fBinaryMapoptLastoptionsgetUsageparseHaddockOptsoptPackageVersionoptPackageNameoptTitle outputDiroptContentsUrl optIndexUrl optCssFileoptSourceCssFile sourceUrlswikiUrlsoptDumpInterfaceFile optLaTeXStyle optMathjax qualification verbosityghcFlags readIfaceArgs findTheme standardTheme defaultThemessingleFileThemedirectoryThemedoesBuiltInExist builtInTheme getThemesPossibleThemes PossibleThemeThemesTheme themeName themeHref themeFiles errMessageretRightgetDirectoryItems isCssFilePathcssFiles styleSheetsequenceEither liftEither concatEitherppHtml copyHtmlBitsheadHtml srcButton wikiButtoncontentsButton indexButtonbodyHtml moduleInfoppHtmlContents ppPrologue ppModuleTree mkNodeListmkNode ppHtmlIndex ppHtmlModuleppHtmlModuleMiniSynopsis ifaceToHtml miniSynopsisprocessForMiniSynopsis ppNameMinippTyClBinderWithVarsMinippModuleContentsnumberSectionHeadings nothingIf processDecltrimprocessDeclOneLiner groupHeadinggroupTag groupTokens TokenGroup GrpNormalGrpRich StyleClassrenderbodyheader tokenGroup richToken tokenSpanrichTokenStyle tokenStyle multiclassexternalAnchorinternalAnchorexternalAnchorIdentinternalAnchorIdent hyperlinkinternalHyperlinkexternalNameHyperlinkexternalModHyperlink renderSpace lineAnchorparsechunklex' spanToNewlineGHC.ListbreakspanSpaceOrCppspan GHC.UnicodeisSpace chunkCommenttagtokenizeclassifykeywordsglyphsspecialsymbols isIdentifier DetailsMapenrich variablestypesbindsdeclsimportsmatches lookupBySpan enrichTokencreateInterfaceGHCTypecheckedModulemkMapsMaps subordinatestypeDocs classDeclstopDeclsmkFixMapungroupHsGroupmkDecls sortByLoc filterDecls filterClasses collectDocs mkExportItemshiValExportItemSrcLocSrcSpan lookupDocs moduleExports extractDeclpruneExportItems findNamedDoc mkAliasMaplookupModuleDyn mkWarningMap moduleWarning parseWarning mkDocOpts parseOptionhiDeclfullModuleContents extractRecSelmkVisibleNamesseqListmkMaybeTokenizedSrcmkTokenizedSrcbuildHomeLinks createIfaces0 createIfaces processModule withTempDirppHyperlinkedSourceppHyperlinkedModuleSource srcCssFilehighlightScriptdefaultCssFile lookupConvcat' OutputableTagsTagTagLTagPTagPre TagInlineStrprefixppHoogle dropHsDocTy outHsType dropCommentoutWithoperator commaSeparateppExport ppSigWithDocppSigpp_sigppClass ppInstance ppSynonymppDatappCtorppFixityppDocumentationdocmdocdocWithboxstr markupTagshowTags showBlockasInline showInlineshowPre unwordsWrapescape ppDocBookhandleNormalExceptionswarningsmodulePackageInfowithGhc'GhcMonadGhchypSrcWarningshandleTopExceptionshandleHaddockExceptionshandleGhcExceptionsreadPackagesAndProcessModules renderStepreadInterfaceFilesgetHaddockLibDir shortcutFlagsupdateHTMLXRefs getPrologue