@@ -53,19 +53,22 @@ data ElmOptions = ElmOptions
5353 argument.
5454 -}
5555 urlPrefix :: UrlPrefix
56− , elmTypeAlterations :: (EType -> EType)
56+ , elmTypeAlterations :: (EType -> EType)
5757 -- ^ Alterations to perform on ETypes before code generation.
5858 , elmAlterations :: (ETypeDef -> ETypeDef)
5959 -- ^ Alterations to perform on ETypeDefs before code generation.
60− , elmToString :: (EType -> Text)
60+ , elmToString :: (EType -> Text)
6161 -- ^ Elm functions creating a string from a given type.
6262 , emptyResponseElmTypes :: [EType]
6363 -- ^ Types that represent an empty Http response.
6464 , stringElmTypes :: [EType]
6565 -- ^ Types that represent a String.
6666 , expectJsonMethod :: Text
67+ -- ^ The function to use for JSON responses.
6768 , expectStringMethod :: Text
69+ -- ^ The function to use for string responses.
6870 , httpErrorType :: Text
71+ -- ^ The type to use for Http errors.
6972 }
7073
7174
@@ -89,6 +92,9 @@ The default options are:
8992> , stringElmTypes =
9093> [ getType (Proxy :: Proxy String)
9194> , getType (Proxy :: Proxy T.Text) ]
95+> , expectJsonMethod = "Http.expectJson"
96+> , expectStringMethod = "Http.expectString"
97+> , httpErrorType = "Http.Error"
9298> }
9399-}
94100defElmOptions :: ElmOptions