git.iko.soy/haskell-servant/servant-elm
on master help sign in
Merge pull request #73 from domenkozar/more-type-alternations

Apply more elmTypeAlterations

commit12487301788a0d17e9766b33971fd2f3750f297f authorDomen Kožar <domen@dev.si> dateMon 1 Jan 2024, 20:43 (3 years ago) parent440a5e0d52a733
1 file changed+2−2
src/Servant/Elm/Internal/Generate.hs+2−2
src/Servant/Elm/Internal/Generate.hs+2−2
@@ -583,7 +583,7 @@ response body.
583583-}
584584isEmptyType :: ElmOptions -> EType -> Bool
585585isEmptyType opts elmTypeExpr =
586− elmTypeExpr `elem` emptyResponseElmTypes opts
586+ (elmTypeAlterations opts elmTypeExpr) `elem` emptyResponseElmTypes opts
587587
588588
589589{- | Determines whether we call `toString` on URL captures and query params of
@@ -591,7 +591,7 @@ this type in Elm.
591591-}
592592isElmStringType :: ElmOptions -> EType -> Bool
593593isElmStringType opts elmTypeExpr =
594− elmTypeExpr `elem` stringElmTypes opts
594+ (elmTypeAlterations opts elmTypeExpr) `elem` stringElmTypes opts
595595
596596{- | Determines whether a type is 'Maybe a' where 'a' is something akin to a 'String'.
597597-}