unarrayT :: Type -> Type
unarrayT ty =
  let ns = "Network.AuthorizeNet.TH.unarrayT: "
  in case ty of
    (AppT outerTy innerTy) | outerTy == ConT ''ArrayOf -> innerTy
    _ -> error $ ns ++ "Unexpected outer pattern " ++ show ty
unarrayT :: Type -> Type
unarrayT ty =
  let ns = "Network.AuthorizeNet.TH.unarrayT: "
  in case ty of
    (AppT outerTy innerTy) | outerTy == ConT ''ArrayOf -> innerTy
    _ -> error $ ns ++ "Unexpected outer pattern " ++ show ty
unarrayT ty =
  let ns = "Network.AuthorizeNet.TH.unarrayT: "
  in case ty of
    (AppT outerTy innerTy) | outerTy == ConT ''ArrayOf -> innerTy
    _ -> error $ ns ++ "Unexpected outer pattern " ++ show ty