We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cfca98 commit 250be8dCopy full SHA for 250be8d
how-does-servants-type-dsl-work.cabal
@@ -9,6 +9,7 @@ maintainer: hi@bradparker.com
9
executable server
10
main-is: Main.hs
11
build-depends: base ^>=4.12.0.0
12
+ , aeson
13
, servant-server
14
, time
15
, wai
src/Main.hs
@@ -6,6 +6,7 @@
6
7
module Main where
8
+import Data.Aeson (ToJSON)
import Data.Proxy (Proxy(Proxy))
import Data.Time (Day)
import GHC.Generics (Generic)
@@ -28,6 +29,8 @@ data User = User
28
29
, registrationDate :: Day
30
} deriving (Generic)
31
32
+instance ToJSON User
33
+
34
type UsersIndex =
35
Get '[JSON] [User]
36
0 commit comments