diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2017-10-31 20:06:17 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2017-10-31 20:06:17 +0300 |
commit | 820ea577989fd40473db25f6166092336c483338 (patch) | |
tree | 7c33da09aac6122c4a66eb23e111b806b9ef7b87 /src/Sproxy | |
parent | 844c0d058298489823b183004c5b5385852f6824 (diff) | |
download | sproxy2-820ea577989fd40473db25f6166092336c483338.tar.gz |
Use Template Haskell
Diffstat (limited to 'src/Sproxy')
-rw-r--r-- | src/Sproxy/Application/Access.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Sproxy/Application/Access.hs b/src/Sproxy/Application/Access.hs index c40ef90..c2d0309 100644 --- a/src/Sproxy/Application/Access.hs +++ b/src/Sproxy/Application/Access.hs @@ -1,20 +1,19 @@ -{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE TemplateHaskell #-} module Sproxy.Application.Access ( Inquiry , Question(..) ) where -import Data.Aeson (FromJSON) +import Data.Aeson.TH (defaultOptions, deriveFromJSON) import Data.HashMap.Strict (HashMap) import Data.Text (Text) -import GHC.Generics (Generic) data Question = Question { path :: Text , method :: Text - } deriving (Generic, Show) + } deriving (Show) -instance FromJSON Question +$(deriveFromJSON defaultOptions ''Question) type Inquiry = HashMap Text Question |