úÎr1l­S      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQR Safe-InferedSTUVWXSTUVWXSTUVWX Safe-InferedBErrors that can be thrown when stats are read from an index file. F These errors describe various logical inconsistencies that generally 4 indicate that the index file is corrupted somehow. HSome statistics about the fortunes in a database. These are stored in O the index file and used to speed up various calculations that would otherwise # require re-reading lots of files. YZ[\]^_`abcYZ[\]^_`aYZ[\]^_`abc Safe-Infered Conceptually, an " file is just a header containing  and an array of these entries.  An  Y stores the information needed to locate one string in the fortune fiel, as well as some 1 basic stats about that one file (from which the  will be derived). 9The location of the string in the file, as a byte offset )The number of bytes the string occupies. (The number of characters in the string. #The number of lines in the string. CErrors that can be thrown indicating a problem with an index file. (A handle to an open fortune index file. IAn exception type indicating things that can be wrong about an index file' s header. openIndex path writeMode: Opens the index file at path. The  will  be writable if  writeMode is d,. If there is no index file at that path, D an error will be thrown or the index will be created, depending on  writeMode. UCreate an in-memory index - useful for working with files when, for whatever reason, " you cannot create a valid index. 5Close an index file. Subsequent accesses will fail. ,Force a consistency check on an index file. ?Get some cached stats about the fortunes indexed in this file. Convert one index entry to a  record describing it. Read all the entries in an  Read a specified entry from an . !ARepeatedly invoke a generator for index entries until it returns e, 3 appending all entries returned to the index file. "$Append all the given entries to the  file. #Append a single   to an  file. $Delete all entries from an . %RAll the operations here should preserve correctness of stats, but just in case... 3 This procedure forces the stats to be recomputed.  !"#$%fgh%  !"#$%   !"#$%fgh Safe-Infered &&A handle to an open fortune database. ';Get the path of the text part of an open fortune database. (<Get the path of the index part of an open fortune database. )$openFortuneFile path delim writeMode: Open a fortune file at path,  using delim7 as the character between strings, allowing writing if   writeMode< is set. If no file exists at the specified path, an error : will be thrown or the file will be created, depending on  writeMode. *5Close a fortune file. Subsequent accesses will fail. +Get the  of a &, opening it if necessary. ,Clear a &s # and rebuild it from the contents  of the text file. -getFortune f i retrieves the text of the i' th fortune 3 (according to the order in the index file) in the & f. .1Get the text of every fortune in a fortune file, 9 in the order they occur in the file. Ignores the index  entirely. /:Get the number of fortunes in a fortune file, as recorded  in the index. 0=Append a fortune to a fortune file, inserting a delimiter if  needed and updating the index. &'()*+,-./0 &'()*+,-./0 &'()*+,-./0 Safe-Infered1=Three different search paths are supported, depending on the "type" of fortune 8 requested. These are the types that can be requested. 5+The number of fortune strings in the index 6=The smallest number of characters in any string in the index 7=The greatest number of characters in any string in the index 88The smallest number of lines in any string in the index 98The greatest number of lines in any string in the index :0List all the fortune files in a directory. The i value / specifies whether to search subtrees as well. -Any file which does not have an extension of ".ix" or ".dat" % will be reported as a fortune file (".dat" is not used by A misfortune, but is ignored so that misfortune can share fortune  databases with fortune). ;CList all the fortune files in several directories. Each directory  will be searched by : (using the corresponding i I value to control whether the directory is searched recursively) and all  results will be combined. <Like :' except only returning paths with the  specified file name. =Like ;' except only returning paths with the  specified file name. >Like =: but searches for multiple files in multiple directories. ?RGet the path of the directory containing built-in fortunes of the specified type. @CGet a list of all fortune files on the configured search path (see B) AGGet the default search path for a specified fortune type (ignoring the MISFORTUNE_PATH environment variables) B=Get the configured search path for a specified fortune type.  If the environment variable MISFORTUNE_PATH_ TYPE is set, it will be used.  Otherwise, if MISFORTUNE_PATH* is set, it will be used. Otherwise, the  A will be used. 6Environment variables are interpreted by splitting on : and checking  for an optional j or k! prefix on each component (where j indicates K recursive search of that directory). The default is non-recursive search  for each component. CPSearch for all fortune files in the configured search path with the given name. DXSearch for all fortune files in the configured search path with any of the given names. ESSelect a random fortune from all files matching any of a list of names (or if the W list is empty, all fortune files on the search path). Every fortune string will have ) an equal probability of being selected. FMSelect a random fortune file from a specified distribution and then select a + random fortune from that file (unformly). GGiven a list of &;s, compute a distrubution over them weighted by the number 9 of fortunes in each. If this distribution is used with F, P the result will be a uniform selection over all the fortunes in all the files. HLike G2, but filtering the fortunes. In addition to the N fortune file, the tuples in the distribution include a distribution over the H matching fortune indices in that file, assigning equal weight to each. IPerform an action with an open &, ensuring the file is closed  when the action exits. J!Perform an action with many open &!s, ensuring the files are closed  when the action exits. "123456789:;<=>?@ABCDEFGHIJKLMNOPQRS  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS&'()*+,-./0  !"#$%56789:;<=>1432?@ABCDEFGHIJKLMNOPQR143256789:;<=>?@ABCDEFGHIJKLMNOPQRl      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[8\9<;:]^_`abcdefghiabjdkldkmnmisfortune-0.1 Data.FortunePaths_misfortuneData.Fortune.StatsData.Fortune.IndexData.Fortune.FortuneFile StatsProblemInconsistentLengthsForOneEntryMaxLengthLessThanMinLengthEntriesWithoutLengthsLengthsWithoutEntriesNegativeOffsetNegativeLength NegativeCount FortuneStats IndexEntry stringOffset stringBytes stringChars stringLines IndexProblemAccessToClosedIndexTableLongerThanFile HeaderProblemIndexTableStartsBeforeHeaderEndsUnsupportedVersionBadMagicNumber openIndexcreateVirtualIndex closeIndex checkIndexgetStatsindexEntryStats getEntriesgetEntry unfoldEntries appendEntries appendEntry clearIndex rebuildStats FortuneFilefortuneFilePathfortuneIndexPathopenFortuneFilecloseFortuneFilegetIndex rebuildIndex getFortune getFortunesgetNumFortunes appendFortune FortuneType OffensiveNormalAll numFortunesminCharsmaxLinesminLinesmaxCharslistFortuneFileslistFortuneFilesInfindFortuneFilefindFortuneFileInfindFortuneFilesIn getFortuneDirdefaultFortuneFilesdefaultFortuneSearchPathgetFortuneSearchPathresolveFortuneFileresolveFortuneFiles randomFortunerandomFortuneFromRandomFiledefaultFortuneDistributionfortuneDistributionWherewithFortuneFilewithFortuneFilesmapFortunesWithIndexMmapFortunesWithIndex mapFortunesM mapFortunesfilterFortunesWithIndexMfilterFortunesWithIndexfilterFortunesMfilterFortunesversion getBinDir getLibDir getDataDir getLibexecDirgetDataFileName offsetAfter checkStats statsAreValid$fMonoidFortuneStats$fSemigroupFortuneStatsghc-prim GHC.TypesTruebase Data.MaybeNothing$fExceptionIndexProblem$fExceptionHeaderProblem$fExceptionStatsProblemBoolGHC.Num+-