Commit 5d4f61a81c2f863e46032a705f1544d9ff61eab4

Re-released under BSD3.
Don't derive typeable to make the code more portable.
LICENSE
(26 / 0)
  
1Redistribution and use in source and binary forms, with or without
2modification, are permitted provided that the following conditions are
3met:
4
5 * Redistributions of source code must retain the above copyright
6 notice, this list of conditions and the following disclaimer.
7
8 * Redistributions in binary form must reproduce the above copyright
9 notice, this list of conditions and the following disclaimer in the
10 documentation and/or other materials provided with the distribution.
11
12 * The names of its contributors may not be used to endorse or promote
13 products derived from this software without specific prior written
14 permission.
15
16THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
17IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
19PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
20OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
11{- |
22 Module : Text.ParserCombinators.Parsec.Rfc2234
3 Copyright : (c) 2005-02-10 by Peter Simons
4 License : GPL2
3 Copyright : (c) 2007 Peter Simons
4 License : BSD3
55
66 Maintainer : simons@cryp.to
77 Stability : provisional
  
1{-# OPTIONS -fglasgow-exts #-}
21{- |
32 Module : Text.ParserCombinators.Parsec.Rfc2821
4 Copyright : (c) 2005-04-29 by Peter Simons
5 License : GPL2
3 Copyright : (c) 2007 Peter Simons
4 License : BSD3
65
76 Maintainer : simons@cryp.to
87 Stability : provisional
9 Portability : Haskell 2-pre
8 Portability : portable
109
1110 This module exports parser combinators for the grammar
1211 described in RFC2821, \"Simple Mail Transfer Protocol\",
2020import Text.ParserCombinators.Parsec.Error
2121import Data.List ( intersperse )
2222import Data.Char ( toLower )
23import Data.Typeable
2423import Text.ParserCombinators.Parsec.Rfc2234
2524
2625----------------------------------------------------------------------
3333 | HaveRcptTo
3434 | HaveData
3535 | HaveQuit
36 deriving (Enum, Bounded, Eq, Ord, Show, Typeable)
36 deriving (Enum, Bounded, Eq, Ord, Show)
3737
3838data Event
3939 = Greeting -- ^ reserved for the user
184184-- two mailboxes for equality, the hostname is case-insensitive.
185185
186186data Mailbox = Mailbox [String] String String
187 deriving (Typeable)
188187
189188instance Eq Mailbox where
190189 lhs == rhs = (norm lhs) == (norm rhs)
  
11{- |
22 Module : Text.ParserCombinators.Parsec.Rfc2822
3 Copyright : (c) 2005-02-10 by Peter Simons
4 License : GPL2
3 Copyright : (c) 2007 by Peter Simons
4 License : BSD3
55
66 Maintainer : simons@cryp.to
77 Stability : provisional