!|Wk&      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%Safe<&'()*+,-(c) 2007-2019 Peter SimonsBSD3simons@cryp.to provisionalportableSafe>(dhsemail%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.hsemailHelper function to generate Parser-based instances for the 0 class.hsemail$Match any character of the alphabet.hsemailMatch either "1" or "0".hsemailKMatch 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.hsemailMatch 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>U&hsemailAn ESMTP reply is a three-digit return code plus some waste of bandwidth called "comments". This is what the list of strings is for; one string per line in the reply. 1 will append an "\r\n" end-of-line marker to each entry in that list, so that the resulting string is ready to be sent back to the peer. For example:Gshow $ Reply (Code Success MailSystem 0) ["worked", "like", "a charm" ]+"250-worked\r\n250-like\r\n250 a charm\r\n" If the message is an empty list []%, a default text will be constructed:+show $ Reply (Code Success MailSystem 0) []("250 Success in category MailSystem\r\n"(hsemail/The most general e-mail address has the form: <[@route,...:]user@domain>. This type, too, supports 1 and 2!. Note that a "shown" address is alwaysm enclosed in angular brackets. When comparing two mailboxes for equality, the hostname is case-insensitive.*hsemailThe A= parser will create this data type from a string. Note that all: command parsers expect their input to be terminated with  .-hsemail Might be ;..hsemail Might be <.6hsemail Might be [].7hsemailOptional argument ignored.:hsemailpWhen a valid command has been recognized, but the argument parser fails, then this type will be returned. The 3? contains the name of the command (in all upper-case) and the 4' is, obviously, the error description.;hsemailnullPath = ( [] "" "" = "<>"<hsemail postmaster = ($ [] "postmaster" "" = "<postmaster>"=hsemail Construct a &. Fails 5 if invalid numbers are given.>hsemail<A reply constitutes "success" if the status code is any of ,  , or !.?hsemail<A reply constitutes "failure" if the status code is either # or ".@hsemail The replies 221 and 421 signify Shutdown.AhsemailKThis parser recognizes any of the ESMTP commands defined below. Note that all: command parsers expect their input to be terminated with  .Bhsemail!The parser name "data" was taken.PhsemailMay have an optional a argument, but it is ignored.YhsemailTODO': Add IPv6 address and general literalsahsemail1This is a useful addition: The parser accepts an ^ or a .bhsemailMake the string   terminated no matter what. '\n' is expanded, otherwise   is appended. Note that if the string was terminated incorrectly before, it still is. This function is useful when reading input with ) which removes the end-of-line delimiter.chsemail<Construct a parser for a command without arguments. Expects  !dhsemailConstruct a parser for a command with an argument, which the given parser will handle. The result of the argument parser will be applied to the type constructor before it is returned. Expects  !ehsemail tokenList p 6! will parse a token of the form "p.p", or "p.p.p", and so on. Used in V and ], for example.P#"! $%&'()*:9876543210.-,+/;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdeP*:9876543210.-,+/();<&'$%#"! =>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde(c) 2007-2019 Peter SimonsBSD3simons@cryp.to provisionalportableSafe>evhsemailThis 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.hsemailThis data type represents a parsed Internet Message as defined in this RFC. It consists of an arbitrary number of header lines, represented in the v4 data type, and a message body, which may be empty.hsemailCA NameAddr is composed of an optional realname a mandatory e-mail .hsemailReturn Nothingg 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.hsemailunfold = 'between (optional cfws) (optional cfws)hsemail_Construct a parser for a message header line from the header's name and a parser for the body.hsemailLike ,, but allows the obsolete white-space rules.hsemail4Match 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 .hsemail=Match any US-ASCII character except for control characters,  , or space.  and  are made up of this.hsemailMatch one or more 0 characters and skip any preceding or trailing .hsemailMatch $ and skip any preceding or trailing .hsemailMatch two or more s interspersed by dots.hsemailFMatch any non-whitespace, non-control US-ASCII character except for "\" and """.hsemail Match either  or .hsemailMatch any number of  between double quotes. Any = preceding or following the "atom" is skipped automatically.hsemail Match either  or .hsemailMatch either one or more s or an .hsemailFMatch any non-whitespace, non-control US-ASCII character except for "\" and """.hsemailMatch any number of  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  is included in the returned string.hsemail/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 7TODO: Nor will the  parser perform any& consistency checking. It will accept2parseTest date_time "Wed, 30 Apr 2002 13:12 +0100"2002-04-30 13:12:00 +0100hsemailThis parser matches a  or an < (optionally wrapped in folding whitespace) and return its 8 value.hsemail1This parser will the abbreviated weekday names ("Mon", "Tue$", ...) and return the appropriate 8 value.hsemail+This parser will match a date of the form " dd:mm:yyyyY" and return a tripple of the form (Int,Month,Int) - corresponding to (year,month,day).hsemailiThis parser will match a four digit number and return its integer value. No range checking is performed.hsemailThis parser will match a 3, optionally wrapped in folding whitespace, or an  and return its Month value.hsemail/This parser will the abbreviated month names ("Jan", "Feb$", ...) and return the appropriate 9 value in the range of (1,12).hsemailcMatch a 1 or 2-digit number (day of month), recognizing both standard and obsolete folding syntax.hsemailThis parser will match a  specification followed by a \. It returns the tuple (TimeOfDay,Int) corresponding to the return values of either parser.hsemail7This 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 errorhsemailZThis 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 errorhsemail\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 inputhsemail\This parser will match a two-digit number in the range (0,60) and return its integer value.parseTest second "34"34hsemail>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  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 g, 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 .hsemailParse a list of f addresses, every two addresses being separated by a comma, and return the list of found address(es).hsemailParse a list of f addresses, every two addresses being separated by a comma, and return the list of found address(es).hsemail,Parse an "address specification". That is a , followed by an "@" character, followed by a ". Return the complete address as 3*, ignoring any whitespace or any comments.hsemail&Parse and return a "local part" of an . That is either a  or a .hsemail'Parse and return a "domain part" of an . That is either a  or a .hsemail%Parse a "domain literal". That is a "[(" character, followed by any amount of , followed by a terminating "]7" character. The complete string is returned verbatim.hsemail5Parse and return any characters that are legal in a  . That is  or a .hsemail.Parse and return any ASCII characters except "[", "] ", and "\".hsemailParse 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 w)s (which are unparsed) in the resulting I. 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  parser for further details.hsemail>A message body is just an unstructured sequence of characters.hsemailtThis parser will parse an arbitrary number of header fields as defined in this RFC. For each field, an appropriate v. value is created, all of them making up the v 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.hsemail Parse a "Date:1" header line and return the date it contains a  CalendarTime.hsemail Parse a "From:" header line and return the  address(es) contained in it.hsemail Parse a "Sender:" header line and return the  address contained in it.hsemail Parse a " Reply-To:" header line and return the  address(es) contained in it.hsemail Parse a "To:" header line and return the  address(es) contained in it.hsemail Parse a "Cc:" header line and return the  address(es) contained in it.hsemail Parse a "Bcc:" header line and return the  address(es) contained in it.hsemail Parse a " Message-Id:" header line and return the  contained in it.hsemail Parse a " In-Reply-To:&" header line and return the list of s contained in it.hsemail Parse a " References:&" header line and return the list of s contained in it.hsemail Parse a " message ID:9" and return it. A message ID is almost identical to an 8, but with stricter rules about folding and whitespace.hsemailParse a "left ID" part of a #. This is almost identical to the M of an e-mail address, but with stricter rules about folding and whitespace.hsemailParse a "right ID" part of a #. This is almost identical to the M of an e-mail address, but with stricter rules about folding and whitespace.hsemail!Parse one or more occurrences of  or 8 and return the concatenated string. This makes up the  of a .hsemail!Parse one or more occurrences of  or 8 and return the concatenated string. This makes up the  of a .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 9s found. Please not that each phrase is again a list of s, as returned by the  parser.hsemail Parse a " Resent-Date:2" header line and return the date it contains as 7.hsemail Parse a " Resent-From:" header line and return the  address(es) contained in it.hsemail Parse a "Resent-Sender:" header line and return the  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  address(es) contained in it.hsemail Parse a " Resent-Bcc:" header line and return the 8 address(es) contained in it. (This list may be empty.)hsemail Parse a "Resent-Message-ID:" header line and return the  contained in it.hsemailCParse an arbitrary header field and return a tuple containing the  and $ 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 ":".hsemail9Match the obsolete "quoted pair" syntax, which - unlike  - allowed anyt 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 2 - 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  - allows dots between tokens.hsemail5Match a "phrase list" syntax and return the list of 3-s that make up the phrase. In contrast to a , the a 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 1 but allow for the obsolete folding syntax. TODOhsemailParse a N but allow for a two-digit number (obsolete) and the obsolete folding syntax.hsemailParse a + but allow for the obsolete folding syntax.hsemailParse a + but allow for the obsolete folding syntax.hsemailParse a + but allow for the obsolete folding syntax.hsemailParse a + but allow for the obsolete folding syntax.hsemailParse a + but allow for the obsolete folding syntax.hsemail@Match the obsolete zone names and return the appropriate offset.hsemailThis 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 3&s that make up this route. Relies on  for the actual parsing.hsemailThis parser parses a list of domain names, each of them prefaced with an "at". Multiple names are separated by a comma. The list of !s is returned - and may be empty.hsemailParse the obsolete syntax of a o, which allowed for more liberal insertion of folding whitespace and comments. The actual string is returned.hsemailParse the obsolete syntax of a o, 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 . This one is quite weird: An " contains an arbitrary number of ves - 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 mailboxeshsemailThis parser is identical to  but parses a list of es rather than $es. The main difference is that an  may contain us. Please note that as of now, the parser will return a simple list of addresses; the grouping information is lost.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 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 8 header line but allow for the obsolete folding syntax.hsemailParse a 8 header line but allow for the obsolete folding syntax.hsemail Parse an P header line but allow for the obsolete folding and the obsolete phrase syntax.hsemailParse a P 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 .hsemailbParses the "right part" of a message ID, but allows the obsolete syntax, which is identical to a .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 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 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 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 a but allows the more liberal line-folding syntax between the "field_name" and the "field text".v~}|{zyxw      !v~}|{zyxw      !<      !"#$%&'()*+,-.//0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~dgZ[\Y      !"#$%&'()*+,-+,./01/23/45/67+89/6:/6;<=><?@ABC<DE+FGH$hsemail-2.1.0-H6rrk6yfRqtFr6dPLZwRoCText.Parsec.Rfc2234Text.Parsec.Rfc2821Text.Parsec.Rfc2822 Paths_hsemail System.IOhGetLinecaseChar caseStringmanyNmanyNtoM parsec2readalphabit charactercrlfcrlfctldquotehexdightablwspoctetspvcharwsp quoted_pair quoted_stringCategorySyntax Information Connection Unspecified3 Unspecified4 MailSystem SuccessCodeUnused0PreliminarySuccessSuccessIntermediateSuccessTransientFailurePermanentFailure EsmtpCodeCode EsmtpReplyReplyMailboxEsmtpCmdHeloEhloMailFromRcptToDataRsetSendSomlSamlVrfyExpnHelpNoopQuitTurnWrongArgnullPath postmasterreply isSuccess isFailure isShutdownsmtpCmdsmtpDatarsetquitturnheloehlomailrcptsendsomlsamlvrfyexpnhelpnoop from_pathto_pathpathmailbox local_partdomaina_d_l at_domainaddress_literal ipv4_literalipv4addr subdomain dot_stringatomsnumnumberwordfixCRLFmkCmd0mkCmd1 tokenList $fReadMailbox $fShowMailbox $fEqMailbox$fShowEsmtpCmd$fShowEsmtpCode$fShowEsmtpReply$fEnumSuccessCode$fBoundedSuccessCode$fEqSuccessCode$fOrdSuccessCode$fShowSuccessCode$fEnumCategory$fBoundedCategory $fEqCategory $fOrdCategory$fShowCategoryField OptionalFieldFromSender ReturnPathReplyToToCcBcc MessageID InReplyTo ReferencesSubjectCommentsKeywordsDate ResentDate ResentFrom ResentSenderResentToResentCc ResentBccResentMessageID ResentReplyToReceived ObsReceivedGenericMessageMessageNameAddr nameAddr_name nameAddr_addr maybeOptionunfoldheader obs_header no_ws_ctltextspecialsfwsctextcommentcfwsatextdot_atom dot_atom_textqtextqcontentphraseutext unstructured date_time day_of_weekday_namedateyearmonth month_name day_of_monthdaytime time_of_dayhourminutesecondzoneaddress name_addr angle_addrgroup display_name mailbox_list address_list addr_specdomain_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_pathreceived 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$fShowGenericMessageversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileNameparsec-3.1.13.0Text.Parsec.CharcharstringbaseGHC.ReadReadGHC.Showshow Text.ReadreadGHC.BaseStringText.Parsec.Error ParseErrorassert. time-1.8.0.2&Data.Time.LocalTime.Internal.ZonedTime ZonedTimeData.Time.Calendar.DaysDayghc-prim GHC.TypesInt&Data.Time.LocalTime.Internal.TimeOfDay TimeOfDayText.Parsec.Primtry