iR      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ SafeStringification 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$9;bStringification 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  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.. A special case of  S 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  !"     "!    !"5Safe$#Tokenization is 9 except the white space is tagged rather than discarded.$#Identifiers, symbols, and constants%White space, etc.&Extract the contents of a #.' if the given # is $;  otherwise.( if the given # is not $;  otherwise.)Return the contents of only $ (non-space) tokens.*Trim % #s from both ends of a list of #s.+Is a # 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.-Break an input  into a sequence of Tokensh. Warning: This may not exactly correspond to your target language's definition of a valid identifier!.Collapse a sequence of Tokens back into a . detokenize . tokenize == id.#$%&'()*+,-./ #%$&'()*+,-. #$%&'()*.-+,#$%&'()*+,-./Safe*OT3Expressions 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.7pRead 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 3.8Try to read an 3 from a sequence of #s.9Pretty-print an 3` to something semantically equivalent to the original C syntax (some parentheses may be added).:All 3s 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 !W3456      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG7HI89:;<=3456789:3456789:/3456      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG7HI89:;<=NoneLSTUVSTUVSTUVSTUVSafeW6A fully-populated configuration for the pre-processor.XmPre-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.bA  representing a date.eA  representing a time.h7Ensure that required configuration fields are supplied.i3Extract the current file name from a configuration.j4Extract the include paths name from a configuration.k4Determine if continued long lines should be spliced.l/Determine if C-style comments should be erased.m;Determine if generation of linemarkers should be inhibited.n3Determine if trigraph sequences should be replaced.o&The date the pre-processor was run on.p0The time of the active pre-processor invocation.q6A default configuration with no current file name set.r&Format a date according to the C spec.s&Format a time according to the C spec.tcA default preprocessor configuration with date and time stamps taken from the current system time.WXYZ[\]^_`abcdefghijklmnopqrstWXYZ[\]^_`abcdefghijklmnopqrstefgbcdXYZ[\]^_`aWhijklmnopqrstWX YZ[\]^_`abcdefghijklmnopqrstNone9;OT[|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.)Base functor for a free monad transformer%Hpp can raise various parsing errors."Error conditions we may encounter.YA macro binding environment. type Env = [(String, Macro)] type Env = M.Map String Macro 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.Q{|}~>{|}~Q|}~{.{|}~ 44NoneLOT[ A . is a bit of state carrying a source of input.J,Pop the head non-effect element from a list.K7Pop 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.LMNOPJKQRSTLMNOPJKQRST NoneOT[U 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.VParse a function application. Arguments are separated by commas, and the application runs until the balanced closing parenthesis. If this is not an application, W is returned.X.Emit the tokens of a single argument. Returns c if this is the final argument in an application (indicated by an unbalanced closing parenthesis.YhKick this off after an opening parenthesis and it will yield every token up to the closing parenthesis.ZReturns W 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.[0Trim whitespace from both ends of a sequence of  tokens.\HCollapse internal whitespace to single spaces, and trim trailing space. U]^_VXY`Za[\ U]^_VXY`Za[\ None$*LT['The dynamic capabilities offered by HPPbThe 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.cLIf a line ends with a backslash, it is prepended to the following the line.dDeal with the two-character ##J token pasting/splicing operator. We do so eliminating spaces around the ## operator.e'functionMacro parameters body arguments substitutes  arguments for  parameters in body/ and performs stringification for uses of the #* operator and token concatenation for the ## operator.f1Run a Stream with a configuration for a new file.9Parse the definition of an object-like or function macro.gUReturns everything up to the next newline. The newline character itself is consumed.hFHandle preprocessor directives (commands prefixed with an octothorpe).iWe 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.jTTake everything up to the end of this branch, drop all remaining branches (if any).k5Skip to the end of a conditional branch. Returns the l. the token that ends this branch if it is an else or elif, or W, otherwise, and the number of lines skipped.m9Expands an input line producing a stream of output lines.n-Standard CPP settings for processing C files.o0For Haskell we do not want trigraph replacement.pBIf we don't have a predefined processor, we build one based on a W value./Run a stream of lines through the preprocessor.qCGeneral hpp runner against input source file lines; can return an  value if something goes wrong.\General hpp runner against input source file lines. Any errors encountered are thrown with r.%hpp runner that returns output lines.*bsctuvwxdeyfz{|}g~hijkmnopq*bsctuvwxdeyfz{|}g~hijkmnopq NoneOT:Break a string on an equals sign. For example, the string x=y is broken into  [x,"=",y].iIf 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.     !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_^`abcdefghhijjklmnopqrstuvwxyz{|}~        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNNOPQRSTU V WX Y Z [ \ ] ^ _ ` a b c d e f g h i j k lm n o p q rst u v w x y z { | } ~               hpp-0.4.0-LRlWcrmIBRTE549jpl1NPl Hpp.String Hpp.StringSig Hpp.TokensHpp.ExprHpp.Env Hpp.Config Hpp.Types Hpp.Parser Hpp.ExpansionHpp Hpp.CmdLine 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 $fShowExpremptyEnv insertPair deleteKey lookupKeyConfigConfigF curFileNameF includePathsFspliceLongLinesFeraseCCommentsFinhibitLinemarkersFreplaceTrigraphsF prepDateF prepTimeF DateString getDateString TimeString getTimeString realizeConfig curFileName includePathsspliceLongLineseraseCCommentsinhibitLinemarkersreplaceTrigraphsprepDateprepTimedefaultConfigFformatPrepDateformatPrepTimedefaultConfigFNow$fEqTimeString$fOrdTimeString$fShowTimeString$fEqDateString$fOrdDateString$fShowDateStringLensMacroObjectFunctionScanUnmaskMaskRescanHasEnvgetEnvsetEnv HasHppStategetStatesetStateHppTrunHppTHppFReadFileReadNext WriteOutputHppState hppConfig hppLineNumhppEnvFreeFPureFHasError throwErrorErrorUnterminatedBranchBadMacroDefinitionBadIfPredicateBadLineArgumentIncludeDoesNotExist FailedInclude UserErrorUnknownCommandTooFewArgumentsToMacroBadMacroArguments NoInputFileBadCommandLine RanOutOfInputTOKENStringEnvLineNum writeOutput lookupMacrosetLgetLover emptyHppStateconfiglineNumenvuse.=%= $fShowMacro$fHasEnvExceptT$fHasEnvStateT$fHasEnvStateT0 $fHasEnvHppT$fHasHppStateHppT$fHasHppStateStateT$fHasHppStateStateT0 $fMonadIOHppT$fMonadTransHppT $fMonadHppT$fApplicativeHppT $fFunctorHppT $fFunctorHppF$fFunctorFreeF$fHasErrorHppT$fHasErrorStateT$fHasHppStateExceptT$fHasErrorExceptT $fEqError $fOrdError $fShowError$fEqScan $fShowScanParserParserTawaitreplaceprecedeparse runParser evalParse awaitJust droppingWhile takingWhileinsertInputSegmentonInputSegmentonChunks onElements onIsomorphism expandLineHppCapsparseDefinition hppReadFile preprocesshppIOhppFileContents runWithArgsbaseGHC.BasetrimEnd Data.OldListwordsghc-prim GHC.TypesTrueFalsetokWordssplitsvalidIdentifierChar fixExponents LitStringChar DBackSlash EscapedDQuoteDQuoteTokCharTokSpaceTokQuote TokDQuotemaybeImpdigitsFromBase escapeCharFunLikeCppInt precedenceBin fixStringLits fixUnaryOps fixBinaryOpsfinishShunting juggleBinOpsshuntRPN rpnToExprInt evalExpr'FunBinFunUnaryFunParenAssoc RightLeft LeftRight getCppIntParsedPBinOpPUnaryOpPLitLitLitIntLitUIntLitStrLitCharLitIDUnaryOpNegBitNotNotDefinedBinOpAddSubMulDivModBitAndBitOrBitXorShiftLShiftRLessThan GreaterThanEqualTo NotEqualToGreaterOrEqualTo LessOrEqualToAndOr onCommonType onCommonTypeB integralCppbitsCpp cppShiftL cppShiftR cppComplement associativity precedenceonFirstImportant renderBinOp renderUnaryOplexExpr parseUnaryOp parseBinOpparseOp readWideCharreadNarrowCharparseLit readLitInt'opParsedopFununconsMunconsMNonEmpty HeadspringhsAwait hsPrecedeRopeM unconsSpring flattenSpring chunkSpring ropePrecedeunscanappParseNothingargParse parentheticalexpandFunctiontrimScan trimScanAux isSpaceScanisImportantScan expandLine'argError expandMacro trigraphs lineSplicingprepTOKENSplices functionMacro streamNewFiletakeLine directive squashDefines takeBranchFun dropBranchJustmacroExpansion normalCPP haskellCPP genericConfighppIO'GHC.ErrerrortrigraphReplacementbreakBlockCommentStartbreakBlockCommentEnddropOneLineBlockCommentsremoveMultilineCommentscommentRemoval modifyStateincludeCandidatessearchForIncludesearchForNextIncluderunHppdropLine expandLineP hppReadNextgetCmddroppingSpaces dropBranchFun yieldLineNumdropBranchLineparseStreamHpp prepareInputbreakEqs splitSwitches parseArgs