conType :: Con -> Type
conType con =
  let ns = "Network.AuthorizeNet.TH.conType: "
  in case con of
    NormalC _ [(_,x)] -> x
    RecC _ [(_,_,x)] -> x
    NormalC name xs -> error $ ns ++ "Expected exactly one field for constructor " ++ showName name
    RecC name xs -> error $ ns ++ "Expected exactly one field for constructor " ++ showName name
    _ -> error $ ns ++ "Unsupported constructor type" ++ show con
conType :: Con -> Type
conType con =
  let ns = "Network.AuthorizeNet.TH.conType: "
  in case con of
    NormalC _ [(_,x)] -> x
    RecC _ [(_,_,x)] -> x
    NormalC name xs -> error $ ns ++ "Expected exactly one field for constructor " ++ showName name
    RecC name xs -> error $ ns ++ "Expected exactly one field for constructor " ++ showName name
    _ -> error $ ns ++ "Unsupported constructor type" ++ show con
conType con =
  let ns = "Network.AuthorizeNet.TH.conType: "
  in case con of
    NormalC _ [(_,x)] -> x
    RecC _ [(_,_,x)] -> x
    NormalC name xs -> error $ ns ++ "Expected exactly one field for constructor " ++ showName name
    RecC name xs -> error $ ns ++ "Expected exactly one field for constructor " ++ showName name
    _ -> error $ ns ++ "Unsupported constructor type" ++ show con