@@ -27,7 +27,7 @@ import Servant.API.Post
27import Servant.API.QueryParam
27import Servant.API.QueryParam
28import Servant.API.Raw
28import Servant.API.Raw
29import Servant.API.Sub
29import Servant.API.Sub
30−import Servant.API.Union
30+import Servant.API.Alternative
31import Servant.Server
31import Servant.Server
@@ -184,20 +184,20 @@ rawSpec = do
184 simpleBody response `shouldBe` cs (show ["bar" :: String])
184 simpleBody response `shouldBe` cs (show ["bar" :: String])
187−type UnionApi =
187+type AlternativeApi =
188 "foo" :> Get Person
188 "foo" :> Get Person
189 :<|> "bar" :> Get Animal
189 :<|> "bar" :> Get Animal
190−unionApi :: Proxy UnionApi
190+unionApi :: Proxy AlternativeApi
191unionApi = Proxy
191unionApi = Proxy
193−unionServer :: Server UnionApi
193+unionServer :: Server AlternativeApi
194unionServer =
194unionServer =
195 return alice
195 return alice
196 :<|> return jerry
196 :<|> return jerry
198unionSpec :: Spec
198unionSpec :: Spec
199unionSpec = do
199unionSpec = do
200− describe "Servant.API.Union" $ do
200+ describe "Servant.API.Alternative" $ do
201 with (return $ serve unionApi unionServer) $ do
201 with (return $ serve unionApi unionServer) $ do
202 it "unions endpoints" $ do
202 it "unions endpoints" $ do
203 response <- get "/foo"
203 response <- get "/foo"