!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Safe+&6A fully-populated configuration for the pre-processor.mPre-processor configuration parameterized over a functor. This is used to normalize partial configurations,  ConfigF Maybe<, and configurations suitable for the pre-processor logic, ConfigF IdentityB. Specifically, the source file name of the file being processed must be set.Name of the file being preprocessed. Hpp will update this as new files are included. The user must set it manually for the starting input file.(Paths to be searched for included files.A backslash as the last character of a line causes the next line to be appended to the current one eliding the newline character present in the source input.#Erase line comments (starting with //$) and block comments (delimited by /* and */). Do not emit #line directives.XReplace trigraph sequences (each of which starts with two consecutive question marks ("??"") with the characters they encode. Format string for __DATE__. Format string for __TIME__. A  representing a date.A  representing a time.7Ensure that required configuration fields are supplied.3Extract the current file name from a configuration.4Extract the include paths name from a configuration.4Determine if continued long lines should be spliced./Determine if C-style comments should be erased.;Determine if generation of linemarkers should be inhibited.3Determine if trigraph sequences should be replaced.&The date the pre-processor was run on.0The time of the active pre-processor invocation.A default configuration with no current file name set. Note that long line splicing is enabled, C++-style comments are erased, #line markers are inhibited, and trigraph replacement is disabled.&Format a date according to the C spec.&Format a time according to the C spec.cA default preprocessor configuration with date and time stamps taken from the current system time.       NoneN,$%&'$%&'Safe8L(Stringification puts double quotes around a string and backslashes before existing double quote characters and backslash characters.)9Remove double quote characters from the ends of a string.*Trim trailing spaces from a MRemove a suffix of a list all of whose elements satisfy the given predicate.+0Similar to the function of the same name in the text package.breakOn needles haystack, finds the first instance of an element of needles in haystack^. The first component of the result is the needle tag, the second component is the prefix of haystackJ before the matched needle, the third component is the remainder of the haystack after the needle..,Used to make switching to the text package easier.()*+,()*+,Safe%;=dE-?A collection of operations relating to sequences of characters..Stringification puts double quotes around a string and backslashes before existing double quote characters and backslash characters./9Remove double quote characters from the ends of a string.0Trim trailing spaces from a 10Similar to the function of the same name in the text package.breakOn needles haystack, finds the first instance of an element of needles in haystack^. The first component of the result is the needle tag, the second component is the prefix of haystackJ before the matched needle, the third component is the remainder of the haystack after the needle..2A special case of 1S in which we are looking for either a special character or a particular substring.?BAn opportunity to copy a string to its own storage to help with GC-:987210/>.=<6;5?34@CBADEFGH@ABC-./0123456789:;<=>?JIFGHED-./0123456789:;<=>?@ABCE5Safe%WKTokenization is 9 except the white space is tagged rather than discarded.L#Identifiers, symbols, and constantsMWhite space, etc.NExtract the contents of a K.O if the given K is L;  otherwise.P if the given K is not L;  otherwise.QReturn the contents of only L (non-space) tokens.RTrim M Ks from both ends of a list of Ks.SIs a K a newline character?Break a $ into space and non-whitespace runs.splits isDelimiter str tokenizes str using  isDelimiterM as a delimiter predicate. Leading whitespace is also stripped from tokens.Predicate on space characters based on something approximating valid identifier syntax. This is used to break apart non-space characters.Something like 12E+FOO& is a single pre-processor token, so FOO should not be macro expanded.UBreak an input  into a sequence of Tokensh. Warning: This may not exactly correspond to your target language's definition of a valid identifier!VCollapse a sequence of Tokens back into a . detokenize . tokenize == id. KMLNOPQRSTUV KLMNOPQRVUST     KLMSafe+QVm4[Expressions are literal values, binary operators applied to two sub-expressions, or unary operators applied to a single sub-expression.For 5https://en.wikipedia.org/wiki/Shunting-yard_algorithm referenceQIf one side of an operator is unsigned, the other side is converted to unsigned.6Precedence of binary operators from lowest to highest.4String literals are split by tokenization. Fix them!]Re-combine positive and negative unary operators with the tokens to which they are attached.(Re-combine multiple-character operators._pRead a literal integer. These may be decimal, octal, or hexadecimal, and may have a case-insensitive suffix of u, l, or ul.LExhaust the function/operator stack returning the parsed expression in RPN.8Shunting yard algorithm part for dealing with operators.IShunting yard to produce a reverse polish notation (RPN) list of tokens.-Convert an RPN list of parsed tokens into an [.`Try to read an [ from a sequence of Ks.aPretty-print an [` to something semantically equivalent to the original C syntax (some parentheses may be added).bAll [s can be evaluated to an .evalExpr isDefined e evaluates expression eQ in an environment where the existence of macro definitions is captured by the  isDefined+ predicate. All expressions evaluate to an ![\]^_`ab[\]^_`ab[\]^ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFNone;=QV] |6There are object-like macros and function-like macros.}4An object-like macro is replaced with its definition~A function-like macro of some arity taks macro-expanded and raw versions of its arguments, then substitutes them into a body producing a new set of tokens.Macro expansion involves treating tokens differently if they appear in the original source or as the result of a previous macro expansion. This distinction is used to prevent divergence by masking out definitions that could be used recursively.sThings are made somewhat more complicated than one might expect due to the fact that the scope of this masking is not structurally recursive. A object-like macro can expand into a fragment of a macro function application, one of whose arguments is a token matching the original object-like macro. That argument should not be expanded.=An interpreter capability of threading a binding environment.2An interpreter capability to modify dynamic state.AA free monad transformer specialized to HppF as the base functor.cA free monad construction to strictly delimit what capabilities we need to perform pre-processing.)Dynamic state of the preprocessor engine.Initial configuration!Current line number of input file Preprocessor binding environment)Base functor for a free monad transformer%Hpp can raise various parsing errors."Error conditions we may encounter.A macro binding environment. Line numbers are represented as s Looks up a |$ in the current environment. If the |O is found, the environment is juggled so that subsequent lookups of the same | may evaluate more quickly.>{|~}R|}~{ |}~ 44NoneNQV] A  is a bit of state that carries a source of input consisting of a list of values which are either actions in an underlying monad or sequences of inputs. Thus we have chunks of input values with interspersed effects.A 2 is a bit of state that carries a source of input.GKOur input is a list of values each of which is either an action or a value.H,Pop the head non-effect element from a list.I7Pop the first non-null, non-effect element from a list.)Push a value back into a parser's source.4Push a stream of values back into a parser's source.Run a  with a given input stream.awaitP that throws an error with the given message if no more input is available. This may be used to locate where in a processing pipeline input was unexpectedly exhausted.`Discard all values until one fails to satisfy a predicate. At that point, the failing value is  d, and the  stream stops.]Echo all values until one fails to satisfy a predicate. At that point, the failing value is  d, and the  stream stops.JKLM NoneQV]N Extract the  payload from a .Expand all macros to the end of the current line or until all in-progress macro invocations are complete, whichever comes last.OParse a function application. Arguments are separated by commas, and the application runs until the balanced closing parenthesis. If this is not an application, P is returned.Q.Emit the tokens of a single argument. Returns c if this is the final argument in an application (indicated by an unbalanced closing parenthesis.RhKick this off after an opening parenthesis and it will yield every token up to the closing parenthesis.SReturns P if this isn't an application;  Left args if we parsed arguments args%, but there is an arity mismatch; or  Right tokens3 if the function application expanded successfully.T0Trim whitespace from both ends of a sequence of  tokens.UHCollapse internal whitespace to single spaces, and trim trailing space. None%+NV]'The dynamic capabilities offered by HPPVThe first component of each pair represents the end of a known trigraph sequence (each trigraph begins with two consecutive question marks ("??"c). The second component is the single-character equivalent that we substitute in for the trigraph.WLIf a line ends with a backslash, it is prepended to the following the line.XDeal with the two-character ##J token pasting/splicing operator. We do so eliminating spaces around the ## operator.Y'functionMacro parameters body arguments substitutes  arguments for  parameters in body/ and performs stringification for uses of the #* operator and token concatenation for the ## operator.Z1Run a Stream with a configuration for a new file.Interpret the IO components of the preprocessor. This implementation relies on IO for the purpose of checking search paths for included files.Like runHpp , but any #include directives are skipped. These ignored inclusions are tracked in the returned list of files, but note that since extra source files are not opened, any files they might wish to include are not discovered.9Parse the definition of an object-like or function macro.[UReturns everything up to the next newline. The newline character itself is consumed.\hppReadFile lineNumber fileName introduces an  #include fileName, as if it occurred at the given line number.]hppReadNext lineNumber fileName introduces an #include_next fileName, as if it occurred at the given line number.^FHandle preprocessor directives (commands prefixed with an octothorpe)._We want to expand macros in expressions that must be evaluated for conditionals, but we want to take special care when dealing with the meta definedX operator of the expression language that is a predicate on the evaluation environment.`TTake everything up to the end of this branch, drop all remaining branches (if any).a5Skip to the end of a conditional branch. Returns the b. the token that ends this branch if it is an else or elif, or P, otherwise, and the number of lines skipped.c9Expands an input line producing a stream of output lines.d-Standard CPP settings for processing C files.e0For Haskell we do not want trigraph replacement.fBIf we don't have a predefined processor, we build one based on a  value./Run a stream of lines through the preprocessor.g'A concreate choice of types to satisfy  as required by .hCGeneral hpp runner against input source file lines; can return an  value if something goes wrong.General hpp runner against input source file lines. Output lines are fed to the caller-supplied sink function. Any errors encountered are thrown with i.%hpp runner that returns output lines.  NoneKN The result of running hpp/The type of preprocessor actions. Created with  and executed with  or .Preprocess lines of input.Run a preprocessor action with some initial state. Returns the result of preprocessing as well as an updated preprocessor state representation.streamHpp state sink action runs a preprocessor action with some initial state4. Output is streamed to the caller-provided output sink as it is generated. The list of files read during preprocessing is returned along with an updated preprocessor state representation.Like , but does not access the filesystem. Run a preprocessor action with some initial state. Returns the result of preprocessing as well as an updated preprocessor state representation. Since this operation performs no IO, #include~ directives are ignored in terms of the generated output lines, but the files named in those directive are available in the  value returned.An w containing no macro definitions, and default values for the starting configuration: the name of the current file is "NoFile"B, there are no paths to be searched for included files, etc. See 2 for more information on available configuration. Create a  with the given  and .addDefinition name expression adds a binding of name to  expression& in the preprocessor s internal state.GLower level parsing of macro definitions. Will typically be used with % for manual construction of a  binding environment.j NoneQVk:Break a string on an equals sign. For example, the string x=y is broken into  [x,"=",y].liIf no space is included between a switch and its argument, break it into two tokens to simplify parsing.-Run Hpp with the given commandline arguments.m   !"#$%&'()*+,-./012345672345869:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~              !"#$%&'()*+,-./0123456789:;<=>?@ABBCD E FG H I J K L M N O P Q R S T U V W XY Z [ \ ] ^ _`a  b cd hpp-0.5.2-COowHHwc8OcFQ6Mw5MXtEB Hpp.ConfigHpp.Env Hpp.String Hpp.StringSig Hpp.TokensHpp.Expr Hpp.Types Hpp.Parser Hpp.Expansion Hpp.RunHppHpp Hpp.CmdLineConfigConfigF curFileNameF includePathsFspliceLongLinesFeraseCCommentsFinhibitLinemarkersFreplaceTrigraphsF prepDateF prepTimeF DateString getDateString TimeString getTimeString realizeConfig curFileName includePathsspliceLongLineseraseCCommentsinhibitLinemarkersreplaceTrigraphsprepDateprepTimedefaultConfigFformatPrepDateformatPrepTimedefaultConfigFNow$fEqTimeString$fOrdTimeString$fShowTimeString$fEqDateString$fOrdDateString$fShowDateStringemptyEnv insertPair deleteKey lookupKey stringifyunquote trimSpacesbreakOnconsStringybreakCharOrSubunconssnocunsnocsdropsbreaksall sIsPrefixOfisEmpty readLines putStringytoCharscopy CharOrSub CharMatchSubMatchNoMatchNil:.boolJust predicateJust sdropWhile$fStringyByteString $fStringy[]Token ImportantOtherdetok isImportant notImportant importantstrimUnimportantnewLine skipLiteraltokenize detokenize$fFunctorToken $fEqToken $fOrdToken $fShowTokenExprELitEBinOpEUnaryOp readLitInt parseExpr renderExprevalExpr $fNumCppInt $fOrdCppInt $fEqCppInt $fEqBinOp $fOrdBinOp $fShowBinOp $fEqUnaryOp $fOrdUnaryOp $fShowUnaryOp$fEqLit$fOrdLit $fShowLit $fEqParsed $fOrdParsed $fShowParsed $fEqAssoc $fOrdAssoc $fShowAssoc $fEqFunLike $fOrdFunLike $fShowFunLike$fEqExpr $fOrdExpr $fShowExprLensMacroObjectFunctionScanUnmaskMaskRescanHasEnvgetEnvsetEnv HasHppStategetStatesetStateHppTrunHppTHppFReadFileReadNext WriteOutputHppState hppConfig hppLineNumhppEnvFreeFPureFHasError throwErrorErrorUnterminatedBranchBadMacroDefinitionBadIfPredicateBadLineArgumentIncludeDoesNotExist FailedInclude UserErrorUnknownCommandTooFewArgumentsToMacroBadMacroArguments NoInputFileBadCommandLine RanOutOfInputTOKENStringEnvLineNum writeOutput lookupMacrosetLgetLover emptyHppStateconfiglineNumenvuse.=%=$fExceptionError$fHasErrorStateT$fHasErrorExceptT$fFunctorFreeF $fFunctorHppF $fMonadIOHppT$fMonadTransHppT $fMonadHppT$fApplicativeHppT $fFunctorHppT$fHasErrorHppT $fShowMacro$fHasEnvExceptT$fHasEnvStateT$fHasEnvStateT0 $fHasEnvHppT$fHasHppStateHppT$fHasHppStateStateT$fHasHppStateStateT0$fHasHppStateExceptT $fEqError $fOrdError $fShowError$fEqScan $fShowScanParserParserTawaitreplaceprecedeparse runParser evalParse awaitJust droppingWhile takingWhileinsertInputSegmentonInputSegmentonChunks onElements onIsomorphism expandLineHppCaps HppResult hppFilesRead hppResultrunHpp expandHppparseDefinition preprocess hppIOSinkhppIO HppOutput hppOutput streamHppexpand initHppState addDefinition runWithArgsbaseGHC.BasetrimEnd Data.OldListwordsghc-prim GHC.TypesTrueFalsetokWordssplitsvalidIdentifierChar fixExponents LitStringChar DBackSlash EscapedDQuoteDQuoteTokCharTokSpaceTokQuote TokDQuoteFunLikeCppInt precedenceBin fixStringLits fixUnaryOps fixBinaryOpsfinishShunting juggleBinOpsshuntRPN rpnToExprInt evalExpr'FunBinFunUnaryFunParenAssoc RightLeft LeftRight getCppIntParsedPBinOpPUnaryOpPLitLitLitIntLitUIntLitStrLitCharLitIDUnaryOpNegBitNotNotDefinedBinOpAddSubMulDivModBitAndBitOrBitXorShiftLShiftRLessThan GreaterThanEqualTo NotEqualToGreaterOrEqualTo LessOrEqualToAndOrRopeMunconsMunconsMNonEmpty HeadspringhsAwait hsPrecedeunscanappParseNothingargParse parentheticalexpandFunctiontrimScan trimScanAux trigraphs lineSplicingprepTOKENSplices functionMacro streamNewFiletakeLine hppReadFile hppReadNext directive squashDefines takeBranchFun dropBranchJustmacroExpansion normalCPP haskellCPP genericConfigdischargeHppCaps hppIOSink'GHC.ErrerrorbreakEqs splitSwitches