summaryrefslogtreecommitdiffstats
path: root/Codec
diff options
context:
space:
mode:
Diffstat (limited to 'Codec')
-rw-r--r--Codec/MIME/Base64.hs26
-rw-r--r--Codec/MIME/Decode.hs19
-rw-r--r--Codec/MIME/Parse.hs8
-rw-r--r--Codec/MIME/QuotedPrintable.hs15
-rw-r--r--Codec/MIME/Type.hs5
-rw-r--r--Codec/MIME/Utils.hs4
6 files changed, 52 insertions, 25 deletions
diff --git a/Codec/MIME/Base64.hs b/Codec/MIME/Base64.hs
index 848e034..a8da683 100644
--- a/Codec/MIME/Base64.hs
+++ b/Codec/MIME/Base64.hs
@@ -1,7 +1,7 @@
{- |
- Module : MIME.Parse
- Copyright : (c) 2006
+ Module : Codec.MIME.Parse
+ Copyright : (c) 2006-2007
Maintainer :
Stability : unstable
@@ -9,17 +9,17 @@
Base64 decoding and encoding routines.
-}
-module MIME.Base64
+module Codec.MIME.Base64
( encodeRaw -- :: Bool -> String -> [Word8]
- , encodeRawString -- :: Bool -> String -> String
- , encodeRawPrim -- :: Bool -> Char -> Char -> [Word8] -> String
+ , encodeRawString -- :: Bool -> String -> String
+ , encodeRawPrim -- :: Bool -> Char -> Char -> [Word8] -> String
- , formatOutput -- :: Int -> Maybe String -> String -> String
-
- , decode -- :: String -> [Word8]
- , decodeToString -- :: String -> String
- , decodePrim -- :: Char -> Char -> String -> [Word8]
- ) where
+ , formatOutput -- :: Int -> Maybe String -> String -> String
+
+ , decode -- :: String -> [Word8]
+ , decodeToString -- :: String -> String
+ , decodePrim -- :: Char -> Char -> String -> [Word8]
+ ) where
import Data.Bits
import Data.Char
@@ -44,7 +44,7 @@ formatOutput n mbTerm str
chop i xs =
case splitAt i xs of
(as,"") -> as
- (as,bs) -> as ++ crlf ++ chop i bs
+ (as,bs) -> as ++ crlf ++ chop i bs
encodeRaw :: Bool -> [Word8] -> String
encodeRaw trail bs = encodeRawPrim trail '+' '/' bs
@@ -74,7 +74,7 @@ encode3 f a b c rs =
w24 :: Word32
w24 = (fromIntegral a `shiftL` 16) +
(fromIntegral b `shiftL` 8) +
- fromIntegral c
+ fromIntegral c
decodeToString :: String -> String
decodeToString str = map (chr.fromIntegral) $ decode str
diff --git a/Codec/MIME/Decode.hs b/Codec/MIME/Decode.hs
index f23454a..3fbbddf 100644
--- a/Codec/MIME/Decode.hs
+++ b/Codec/MIME/Decode.hs
@@ -1,8 +1,21 @@
-module MIME.Decode where
+--------------------------------------------------------------------
+-- |
+-- Module : Codec.MIME.Decode
+-- Copyright : (c) Galois, Inc. 2006..2008
+-- License : BSD3
+--
+-- Maintainer: Don Stewart <dons@galois.com>
+-- Stability : provisional
+-- Portability:
+--
+--------------------------------------------------------------------
+
+module Codec.MIME.Decode where
import Data.Char
-import MIME.QuotedPrintable as QP
-import MIME.Base64 as Base64
+
+import Codec.MIME.QuotedPrintable as QP
+import Codec.MIME.Base64 as Base64
decodeBody :: String -> String -> String
decodeBody enc body =
diff --git a/Codec/MIME/Parse.hs b/Codec/MIME/Parse.hs
index 06fffc6..22ba88c 100644
--- a/Codec/MIME/Parse.hs
+++ b/Codec/MIME/Parse.hs
@@ -1,6 +1,6 @@
{- |
Module : MIME.Parse
- Copyright : (c) 2006
+ Copyright : (c) 2006-2007 Galois Inc.
Maintainer : tse-dev-team@galois.com
Stability : unstable
@@ -8,13 +8,13 @@
Parsing MIME content.
-}
-module MIME.Parse
+module Codec.MIME.Parse
( parseMIMEBody
, parseMIMEType
) where
-import MIME.Type
-import MIME.Decode
+import Codec.MIME.Type
+import Codec.MIME.Decode
import Data.Char
import Data.Maybe
diff --git a/Codec/MIME/QuotedPrintable.hs b/Codec/MIME/QuotedPrintable.hs
index 514ce4e..d6c058e 100644
--- a/Codec/MIME/QuotedPrintable.hs
+++ b/Codec/MIME/QuotedPrintable.hs
@@ -1,4 +1,17 @@
-module MIME.QuotedPrintable where
+--------------------------------------------------------------------
+-- |
+-- Module : Codec.MIME.QuotedPrintable
+-- Copyright : (c) Galois, Inc. 2008
+-- License : BSD3
+--
+-- Maintainer:
+-- Stability : provisional
+-- Portability:
+--
+--------------------------------------------------------------------
+
+
+module Codec.MIME.QuotedPrintable where
import Data.Char
diff --git a/Codec/MIME/Type.hs b/Codec/MIME/Type.hs
index e9266ec..7f40554 100644
--- a/Codec/MIME/Type.hs
+++ b/Codec/MIME/Type.hs
@@ -1,7 +1,7 @@
{- |
Module : MIME.Type
- Copyright : (c) 2006
+ Copyright : (c) 2006-2007 Galois Inc.
Maintainer : tse-dev-team@galois.com
Stability : unstable
@@ -9,7 +9,8 @@
Representing MIME types and values.
-}
-module MIME.Type where
+
+module Codec.MIME.Type where
import Data.List ( concatMap, isSuffixOf )
diff --git a/Codec/MIME/Utils.hs b/Codec/MIME/Utils.hs
index a5db2d9..f0bb2a1 100644
--- a/Codec/MIME/Utils.hs
+++ b/Codec/MIME/Utils.hs
@@ -8,11 +8,11 @@
Extracting content from MIME values and types.
-}
-module MIME.Utils
+module Codec.MIME.Utils
( findMultipartNamed -- :: String -> MIMEValue -> Maybe MIMEValue
) where
-import MIME.Type
+import Codec.MIME.Type
import Data.List ( find )
import Control.Monad ( msum )