Skip to content
Permalink
Browse files

Give User ToJSON instance for as yet unknown reasons

  • Loading branch information...
bradparker committed Oct 2, 2019
1 parent 1cfca98 commit 250be8d5a90532e412245cc17a01c1964189e584
Showing with 4 additions and 0 deletions.
  1. +1 −0 how-does-servants-type-dsl-work.cabal
  2. +3 −0 src/Main.hs
@@ -9,6 +9,7 @@ maintainer: hi@bradparker.com
executable server
main-is: Main.hs
build-depends: base ^>=4.12.0.0
, aeson
, servant-server
, time
, wai
@@ -6,6 +6,7 @@

module Main where

import Data.Aeson (ToJSON)
import Data.Proxy (Proxy(Proxy))
import Data.Time (Day)
import GHC.Generics (Generic)
@@ -28,6 +29,8 @@ data User = User
, registrationDate :: Day
} deriving (Generic)

instance ToJSON User

type UsersIndex =
Get '[JSON] [User]

0 comments on commit 250be8d

Please sign in to comment.
You can’t perform that action at this time.