git.iko.soy/haskell-servant/servant-elm
on master help sign in
Merge pull request #73 from domenkozar/more-type-alternations
1248730Domen Kožar
src/Servant/Elm/Internal/Generate.hs+2−2
@@ -583,7 +583,7 @@ response body.
583-}
583-}
584isEmptyType :: ElmOptions -> EType -> Bool
584isEmptyType :: ElmOptions -> EType -> Bool
585isEmptyType opts elmTypeExpr =
585isEmptyType opts elmTypeExpr =
586− elmTypeExpr `elem` emptyResponseElmTypes opts
586+ (elmTypeAlterations opts elmTypeExpr) `elem` emptyResponseElmTypes opts
587
587
588
588
589{- | Determines whether we call `toString` on URL captures and query params of
589{- | Determines whether we call `toString` on URL captures and query params of
@@ -591,7 +591,7 @@ this type in Elm.
591-}
591-}
592isElmStringType :: ElmOptions -> EType -> Bool
592isElmStringType :: ElmOptions -> EType -> Bool
593isElmStringType opts elmTypeExpr =
593isElmStringType opts elmTypeExpr =
594− elmTypeExpr `elem` stringElmTypes opts
594+ (elmTypeAlterations opts elmTypeExpr) `elem` stringElmTypes opts
595
595
596{- | Determines whether a type is 'Maybe a' where 'a' is something akin to a 'String'.
596{- | Determines whether a type is 'Maybe a' where 'a' is something akin to a 'String'.
597-}
597-}