Skip to content

Commit 12aa753

Browse files
committed
Create a value for usersServer with typed holes
1 parent 250be8d commit 12aa753

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Main.hs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ import GHC.Generics (Generic)
1313
import Network.Wai (Application)
1414
import Network.Wai.Handler.Warp (run)
1515
import Servant
16-
( (:<|>)
16+
( (:<|>)((:<|>))
1717
, (:>)
1818
, Capture
1919
, Get
2020
, JSON
21+
, Server
2122
, serve
2223
)
2324

@@ -42,8 +43,11 @@ type UsersAPI =
4243
"users"
4344
:> (UsersIndex :<|> UsersShow)
4445

46+
usersServer :: Server UsersAPI
47+
usersServer = _usersIndex :<|> _usersShow
48+
4549
usersApp :: Application
46-
usersApp = serve (Proxy @UsersAPI) _usersServer
50+
usersApp = serve (Proxy @UsersAPI) usersServer
4751

4852
main :: IO ()
4953
main = run 8080 usersApp

0 commit comments

Comments
 (0)