úÎ!?‚4DÅ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄ(c) 2007-2019 Peter SimonsBSD3simons@cryp.to provisionalportableSafe>!Êhsemail%Case-insensitive variant of Parsec's Å function.hsemail%Case-insensitive variant of Parsec's Æ function.hsemailMatch a parser at least n times.hsemailMatch a parser at least n times, but no more than m times.hsemail$Match any character of the alphabet.hsemailMatch either "1" or "0".hsemailLMatch any 7-bit US-ASCII character except for NUL (ASCII value 0, that is).hsemail$Match the carriage return character \r.hsemail%Match returns the linefeed character \n. hsemailMatch the Internet newline \r\n. hsemailnMatch any US-ASCII control character. That is any character with a decimal value in the range of [0..31,127]. hsemail"Match the double quote character """. hsemailgMatch any character that is valid in a hexadecimal number; ['0'..'9'] and ['A'..'F','a'..'f'] that is. hsemailMatch the tab ("\t ") character.hsemail>Match "linear white-space". That is any number of consecutive , optionally followed by a   and (at least) one more .hsemailMatch any character.hsemailMatch the space.hsemail~Match any printable ASCII character. (The "v" stands for "visible".) That is any character in the decimal range of [33..126].hsemail Match either  or  .hsemailKMatch a "quoted pair". Any characters (excluding CR and LF) may be quoted.hsemail%Match a quoted string. The specials "\" and ""L" must be escaped inside a quoted string; CR and LF are not allowed at all.  (c) 2007-2019 Peter SimonsBSD3simons@cryp.to provisionalportableSafe>.à„hsemail£This data type represents any of the header fields defined in this RFC. Each of the various instances contains with the return value of the corresponding parser./hsemail•This data type represents a parsed Internet Message as defined in this RFC. It consists of an arbitrary number of header lines, represented in the 3 data type, and a message body, which may be empty.1hsemailCA NameAddr is composed of an optional realname a mandatory e-mail [.5hsemailReturn Nothingf if the given parser doesn't match. This combinator is included in the latest parsec distribution as  optionMaybe,, but ghc-6.6.1 apparently doesn't have it.6hsemailunfold = 'between (optional cfws) (optional cfws)7hsemail_Construct a parser for a message header line from the header's name and a parser for the body.8hsemailLike 7,, but allows the obsolete white-space rules.9hsemail4Match any US-ASCII non-whitespace control character.:hsemail(Match any US-ASCII character except for r, n.;hsemail-Match any of the RFC's "special" characters:  ()<>[]:;@,.\".<hsemail1Match a "quoted pair". All characters matched by :/ may be quoted. Note that the parsers returns both3 characters, the backslash and the actual content.=hsemail7Match "folding whitespace". That is any combination of  and   followed by .>hsemail<Match any non-whitespace, non-control character except for "(", ")", and "\2". This is used to describe the legal content of ?s.NoteÒ: This parser accepts 8-bit characters, even though this is not legal according to the RFC. Unfortunately, 8-bit content in comments has become fairly common in the real world, so we'll just accept the fact.?hsemail/Match a "comments". That is any combination of >, <s, and =% between brackets. Comments may nest.@hsemailMatch any combination of = and |.Ahsemail<Match any US-ASCII character except for control characters, ; , or space. B and C are made up of this.BhsemailMatch one or more A0 characters and skip any preceding or trailing @.ChsemailMatch D$ and skip any preceding or trailing @.DhsemailMatch two or more As interspersed by dots.EhsemailFMatch any non-whitespace, non-control US-ASCII character except for "\" and """.Fhsemail Match either E or <.GhsemailMatch any number of F between double quotes. Any @= preceding or following the "atom" is skipped automatically.Hhsemail Match either B or G.IhsemailMatch either one or more Hs or an “.JhsemailFMatch any non-whitespace, non-control US-ASCII character except for "\" and """.KhsemailMatch any number of J tokens.8"Unstructured text" is used in free text fields such as {T. Please note that any comments or whitespace that prefaces or follows the actual J is included in the returned string.Lhsemail/Parse a date and time specification of the form ! Thu, 19 Dec 2002 20:35:46 +0200!where the weekday specification "Thu,2" is optional. The parser returns an appropriate ÇTODO: Nor will the L parser perform any& consistency checking. It will accept2parseTest date_time "Wed, 30 Apr 2002 13:12 +0100"2002-04-30 13:12:00 +0100MhsemailThis parser matches a N or an –H (optionally wrapped in folding whitespace) and return the appropriate È value.Nhsemail3This parser recognizes abbreviated weekday names ("Mon", "Tue",...).Ohsemail+This parser will match a date of the form " dd:mm:yyyyX" and return a tripple of the form (Int,Month,Int) - corresponding to (year,month,day).PhsemailiThis parser will match a four digit number and return its integer value. No range checking is performed.QhsemailThis parser will match a R3, optionally wrapped in folding whitespace, or an ˜ and return its Month value.Rhsemail/This parser will the abbreviated month names ("Jan", "Feb$", ...) and return the appropriate É value in the range of (1,12).ThsemailcMatch a 1 or 2-digit number (day of month), recognizing both standard and obsolete folding syntax.UhsemailThis parser will match a V specification followed by a Z]. It returns the tuple (TimeOfDay,Int) corresponding to the return values of either parser.Vhsemail7This parser will match a time-of-day specification of "hh:mm" or "hh:mm:ss(" and return the corrsponding time as a Ê.)parseTest (time_of_day <* eof) "12:03:23"12:03:23)parseTest (time_of_day <* eof) "99:99:99"5parse error at (line 1, column 3):unknown parse errorWhsemailZThis parser matches a two-digit number in the range (0,24) and returns its integer value.parseTest hour "034"3parseTest hour "99"5parse error at (line 1, column 3):unknown parse errorXhsemail\This parser will match a two-digit number in the range (0,60) and return its integer value.parseTest minute "34"34parseTest minute "61"5parse error at (line 1, column 3):unknown parse errorparseTest (minute <* eof) "034""parse error at (line 1, column 3):unexpected '4'expecting end of inputYhsemail\This parser will match a two-digit number in the range (0,60) and return its integer value.parseTest second "34"34Zhsemail=This parser will match a timezone specification of the form "+hhmm" or "-hhmmA" and return the zone's offset to UTC in seconds as an integer.  is matched as well.[hsemailParse a single \ or an address _ and return the address(es).\hsemailParse a ] or an c and return the address.]hsemail Parse an ^, optionally prefaced with a `, and return the address.^hsemail Parse an ^ or an ž and return the address._hsemail(Parse a "group" of addresses. That is a `1, followed by a colon, optionally followed by a af, followed by a semicolon. The found address(es) are returned - what may be none. Here is an example:@parse group "" "my group: user1@example.org, user2@example.org;"—Right [NameAddr {nameAddr_name = Nothing, nameAddr_addr = "user1@example.org"},NameAddr {nameAddr_name = Nothing, nameAddr_addr = "user2@example.org"}]`hsemailParse and return a I.ahsemailParse a list of \f addresses, every two addresses being separated by a comma, and return the list of found address(es).bhsemailParse a list of [f addresses, every two addresses being separated by a comma, and return the list of found address(es).chsemail,Parse an "address specification". That is a d, followed by an "@" character, followed by a e". Return the complete address as Ë*, ignoring any whitespace or any comments.dhsemail&Parse and return a "local part" of an c. That is either a C or a G.ehsemail'Parse and return a "domain part" of an c. That is either a C or a f.fhsemail%Parse a "domain literal". That is a "[(" character, followed by any amount of g, followed by a terminating "]7" character. The complete string is returned verbatim.ghsemail4Parse and return any characters that are legal in a f . That is h or a <.hhsemail.Parse and return any ASCII characters except "[", "] ", and "\".ihsemailðParse a complete message as defined by this RFC and it broken down into the separate header fields and the message body. Header lines, which contain syntax errors, will not cause the parser to abort. Rather, these headers will appear as )s (which are unparsed) in the resulting 0I. A message must be really, really badly broken for this parser to fail.ÊThis behaviour was chosen because it is impossible to predict what the user of this module considers to be a fatal error; traditionally, parsers are very forgiving when it comes to Internet messages.©If you want to implement a really strict parser, you'll have to put the appropriate parser together yourself. You'll find that this is rather easy to do. Refer to the k parser for further details.jhsemail>A message body is just an unstructured sequence of characters.khsemailtThis parser will parse an arbitrary number of header fields as defined in this RFC. For each field, an appropriate . value is created, all of them making up the  list that this parser returns.WIf you look at the implementation of this parser, you will find that it uses Parsec's Ì modifier around allo of the fields. The idea behind this is that fields, which contain syntax errors, fall back to the catch-all Œ‹. Thus, this parser will hardly ever return a syntax error -- what conforms with the idea that any message that can possibly be accepted should be.lhsemail Parse a "Date:1" header line and return the date it contains a  CalendarTime.mhsemail Parse a "From:" header line and return the a address(es) contained in it.nhsemail Parse a "Sender:" header line and return the \ address contained in it.ohsemail Parse a " Reply-To:" header line and return the b address(es) contained in it.phsemail Parse a "To:" header line and return the b address(es) contained in it.qhsemail Parse a "Cc:" header line and return the b address(es) contained in it.rhsemail Parse a "Bcc:" header line and return the b address(es) contained in it.shsemail Parse a " Message-Id:" header line and return the v contained in it.thsemail Parse a " In-Reply-To:%" header line and return the list of vs contained in it.uhsemail Parse a " References:%" header line and return the list of vs contained in it.vhsemail Parse a " message ID:9" and return it. A message ID is almost identical to an ^7, but with stricter rules about folding and whitespace.whsemailParse a "left ID" part of a v#. This is almost identical to the dM of an e-mail address, but with stricter rules about folding and whitespace.xhsemailParse a "right ID" part of a v#. This is almost identical to the eM of an e-mail address, but with stricter rules about folding and whitespace.yhsemail!Parse one or more occurrences of E or <8 and return the concatenated string. This makes up the w of a v.zhsemail!Parse one or more occurrences of h or <8 and return the concatenated string. This makes up the x of a v.{hsemail Parse a "Subject:Œ" header line and return its contents verbatim. Please note that all whitespace and/or comments are preserved, i.e. the result of parsing "Subject: foo" is " foo", not "foo".|hsemail Parse a " Comments:Œ" header line and return its contents verbatim. Please note that all whitespace and/or comments are preserved, i.e. the result of parsing "Comments: foo" is " foo", not "foo".}hsemail Parse a " Keywords:%" header line and return the list of I9s found. Please not that each phrase is again a list of Bs, as returned by the I parser.~hsemail Parse a " Resent-Date:2" header line and return the date it contains as Ç.hsemail Parse a " Resent-From:" header line and return the a address(es) contained in it.€hsemail Parse a "Resent-Sender:" header line and return the a address(es) contained in it.hsemail Parse a " Resent-To:" header line and return the \ address contained in it.‚hsemail Parse a " Resent-Cc:" header line and return the b address(es) contained in it.ƒhsemail Parse a " Resent-Bcc:" header line and return the b8 address(es) contained in it. (This list may be empty.)„hsemail Parse a "Resent-Message-ID:" header line and return the v contained in it.ŒhsemailCParse an arbitrary header field and return a tuple containing the  and K# text of the header. The name will not contain the terminating colon.hsemailFParse and return an arbitrary header field name. That is one or more Ž characters.ŽhsemailVMatch and return any ASCII character except for control characters, whitespace, and ":".hsemail8Match the obsolete "quoted pair" syntax, which - unlike < - allowed anys ASCII character to be specified when quoted. The parser will return both, the backslash and the actual character.hsemail1Match the obsolete "text" syntax, which - unlike :¿ - allowed "carriage returns" and "linefeeds". This is really weird; you better consult the RFC for details. The parser will return the complete string, including those special characters.‘hsemail<Match and return the obsolete "char" syntax, which - unlike 3 - did not allow "carriage return" and "linefeed".’hsemailEMatch and return the obsolete "utext" syntax, which is identical to .“hsemail3Match the obsolete "phrase" syntax, which - unlike I - allows dots between tokens.”hsemail4Match a "phrase list" syntax and return the list of Ë-s that make up the phrase. In contrast to a I, the ”b separates the individual words by commas. This syntax is - as you will have guessed - obsolete.•hsemail?Parse and return an "obsolete fws" token. That is at least one A character, followed by an arbitrary number (including zero) of   followed by at least one more  character.–hsemailParse a N0 but allow for the obsolete folding syntax. TODO—hsemailParse a PN but allow for a two-digit number (obsolete) and the obsolete folding syntax.˜hsemailParse a R+ but allow for the obsolete folding syntax.™hsemailParse a T+ but allow for the obsolete folding syntax.šhsemailParse a W+ but allow for the obsolete folding syntax.›hsemailParse a X+ but allow for the obsolete folding syntax.œhsemailParse a Y+ but allow for the obsolete folding syntax.hsemail@Match the obsolete zone names and return the appropriate offset.žhsemailšThis parser matches the "obsolete angle address" syntax, a construct that used to be called "route address" in earlier RFCs. It differs from a standard ^¢ in two ways: (1) it allows far more liberal insertion of folding whitespace and comments and (2) the address may contain a "route" (which this parser ignores):Gparse obs_angle_addr "" "<@example1.org,@example2.org:joe@example.org>"Right "<joe@example.org>"Ÿhsemail'This parser parses the "route" part of ž and returns the list of Ë%s that make up this route. Relies on   for the actual parsing. hsemail…This parser parses a list of domain names, each of them prefaced with an "at". Multiple names are separated by a comma. The list of e"s is returned - and may be empty.¡hsemailParse the obsolete syntax of a do, which allowed for more liberal insertion of folding whitespace and comments. The actual string is returned.¢hsemailParse the obsolete syntax of a en, which allowed for more liberal insertion of folding whitespace and comments. The actual string is returned.£hsemail1This parser will match the obsolete syntax for a a. This one is quite weird: An £" contains an arbitrary number of \ues - including none -, which are separated by commas. But you may have multiple consecutive commas without giving a \. You may also have a valid £ that contains no \! at all. On the other hand, you must: have at least one comma. The following example is valid:parse obs_mbox_list "" ","Right []But this one is not:(parse obs_mbox_list "" "joe@example.org"Left (line 1, column 16):unexpected end of input1expecting obsolete syntax for a list of mailboxes€hsemailThis parser is identical to £ but parses a list of [es rather than \$es. The main difference is that an [ may contain _ts. Please note that as of now, the parser will return a simple list of addresses; the grouping information is lost.ŠhsemailParse a O7 header line but allow for the obsolete folding syntax.§hsemailParse a m7 header line but allow for the obsolete folding syntax.šhsemailParse a n7 header line but allow for the obsolete folding syntax.©hsemailParse a o7 header line but allow for the obsolete folding syntax.ªhsemailParse a p7 header line but allow for the obsolete folding syntax.«hsemailParse a q7 header line but allow for the obsolete folding syntax.¬hsemailParse a r7 header line but allow for the obsolete folding syntax.­hsemailParse a s8 header line but allow for the obsolete folding syntax.®hsemail Parse an tP header line but allow for the obsolete folding and the obsolete phrase syntax.¯hsemailParse a uP header line but allow for the obsolete folding and the obsolete phrase syntax.°hsemailaParses the "left part" of a message ID, but allows the obsolete syntax, which is identical to a d.±hsemailbParses the "right part" of a message ID, but allows the obsolete syntax, which is identical to a e.²hsemailParse a {7 header line but allow for the obsolete folding syntax.³hsemailParse a |7 header line but allow for the obsolete folding syntax.ŽhsemailParse a }S header line but allow for the obsolete folding syntax. Also, this parser accepts ”.µhsemailParse a 8 header line but allow for the obsolete folding syntax.¶hsemailParse a €8 header line but allow for the obsolete folding syntax.·hsemailParse a ~8 header line but allow for the obsolete folding syntax.žhsemailParse a 7 header line but allow for the obsolete folding syntax.¹hsemailParse a ‚7 header line but allow for the obsolete folding syntax.ºhsemailParse a ƒ8 header line but allow for the obsolete folding syntax.»hsemailParse a „8 header line but allow for the obsolete folding syntax.ŒhsemailParse a Resent-Reply-To8 header line but allow for the obsolete folding syntax.¿hsemailMatch ž.ÀhsemailThis parser is identical to Œ` but allows the more liberal line-folding syntax between the "field_name" and the "field text".¬.-,+*)('&%$#"! /0124356789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿À¬56789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ1243[\]^_`abcdefgh/0ij.-,+*)('&%$#"! klmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÍ      !"#$%&'()*+,-./01234456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÅÆÈÉÊËÌÍÎÏÐÑÉÒÓÔÕÖÅרÙ$hsemail-2.2.0-HcUtwPYMInqHDZMbUaBqPdText.Parsec.Rfc2234Text.Parsec.Rfc2822caseChar caseStringmanyNmanyNtoMalphabit charactercrlfcrlfctldquotehexdightablwspoctetspvcharwsp quoted_pair quoted_stringField OptionalFieldFromSender ReturnPathReplyToToCcBcc MessageID InReplyTo ReferencesSubjectCommentsKeywordsDate ResentDate ResentFrom ResentSenderResentToResentCc ResentBccResentMessageID ResentReplyToReceived ObsReceivedGenericMessageMessageNameAddr nameAddr_name nameAddr_addr maybeOptionunfoldheader obs_header no_ws_ctltextspecialsfwsctextcommentcfwsatextatomdot_atom dot_atom_textqtextqcontentwordphraseutext unstructured date_time day_of_weekday_namedateyearmonth month_name day_of_monthdaytime time_of_dayhourminutesecondzoneaddressmailbox name_addr angle_addrgroup display_name mailbox_list address_list addr_spec local_partdomaindomain_literaldcontentdtextmessagebodyfields orig_datefromsenderreply_totoccbcc message_id in_reply_to referencesmsg_idid_leftid_right no_fold_quoteno_fold_literalsubjectcommentskeywords resent_date resent_from resent_sender resent_to resent_cc resent_bcc resent_msg_id return_pathpathreceived name_val_list name_val_pair item_name item_valueoptional_field field_nameftextobs_qpobs_textobs_char obs_utext obs_phraseobs_phrase_listobs_fwsobs_day_of_weekobs_year obs_monthobs_dayobs_hour obs_minute obs_secondobs_zoneobs_angle_addr obs_routeobs_domain_listobs_local_part obs_domain obs_mbox_list obs_addr_list obs_fields obs_orig_dateobs_from obs_sender obs_reply_toobs_toobs_ccobs_bccobs_message_idobs_in_reply_toobs_references obs_id_left obs_id_right obs_subject obs_comments obs_keywordsobs_resent_fromobs_resent_sendobs_resent_date obs_resent_to obs_resent_ccobs_resent_bccobs_resent_midobs_resent_reply obs_return obs_receivedobs_path obs_optional$fShowNameAddr $fEqNameAddr $fShowField$fShowGenericMessageparsec-3.1.13.0Text.Parsec.Charcharstring time-1.8.0.2&Data.Time.LocalTime.Internal.ZonedTime ZonedTime*time-compat-1.9.2.2-2s4hxMUsPxYAh4bvYaYAFKData.Time.Calendar.Compat DayOfWeekghc-prim GHC.TypesInt&Data.Time.LocalTime.Internal.TimeOfDay TimeOfDaybaseGHC.BaseStringText.Parsec.Primtry