File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -10,5 +10,6 @@ executable server
1010 main-is : Main.hs
1111 build-depends : base ^>= 4.12.0.0
1212 , servant-server
13+ , time
1314 hs-source-dirs : src
1415 default-language : Haskell2010
Original file line number Diff line number Diff line change 11{-# LANGUAGE DataKinds #-}
2+ {-# LANGUAGE DeriveGeneric #-}
23{-# LANGUAGE TypeOperators #-}
34{-# OPTIONS_GHC -Wall #-}
45
56module Main where
67
8+ import Data.Time (Day )
9+ import GHC.Generics (Generic )
710import Servant
811 ( (:<|>)
912 , (:>)
@@ -13,6 +16,12 @@ import Servant
1316 )
1417
1518data User = User
19+ { name :: String
20+ , age :: Int
21+ , email :: String
22+ , username :: String
23+ , registrationDate :: Day
24+ } deriving (Generic )
1625
1726type UsersIndex =
1827 Get '[JSON ] [User ]
You can’t perform that action at this time.
0 commit comments