ontent_type_parm :: Parser ContentTypeParm
content_type_parm = do
  (attr, val) <- parameterT
  case (attr,val) of
    ("boundary", Left v)  -> return $ Boundary v
    ("boundary", Right _) -> fail "Unexpected Text on Boundary"
    ("name", v)           -> return . Name . either decodeUtf8 id $ v
    ("charset", Left v)   -> return $ Charset v
    ("charset", Right _)  -> fail "Unexpected Text on Charset"
    (a, Left v)           -> return $ ContentTypeParm a v
    (_, Right _)          -> fail "Unexpected Text on ContentTypeParm"

content_type_parm :: Parser ContentTypeParm
content_type_parm = do
  (attr, val) <- parameterT
  case (attr,val) of
    ("boundary", Left v)  -> return $ Boundary v
    ("boundary", Right _) -> fail "Unexpected Text on Boundary"
    ("name", v)           -> return . Name . either decodeUtf8 id $ v
    ("charset", Left v)   -> return $ Charset v
    ("charset", Right _)  -> fail "Unexpected Text on Charset"
    (a, Left v)           -> return $ ContentTypeParm a v
    (_, Right _)          -> fail "Unexpected Text on ContentTypeParm"
content_type_parm = do
  (attr, val) <- parameterT
  case (attr,val) of
    ("boundary", Left v)  -> return $ Boundary v
    ("boundary", Right _) -> fail "Unexpected Text on Boundary"
    ("name", v)           -> return . Name . either decodeUtf8 id $ v
    ("charset", Left v)   -> return $ Charset v
    ("charset", Right _)  -> fail "Unexpected Text on Charset"
    (a, Left v)           -> return $ ContentTypeParm a v
    (_, Right _)          -> fail "Unexpected Text on ContentTypeParm"