Permalink
Browse files

Fixing some deriving warnings.

Specifically the "Both DeriveAnyClass and GeneralizedNewtypeDeriving are
enabled" warning.
  • Loading branch information...
krisajenkins committed Feb 11, 2019
1 parent 7e935d4 commit b6b539aa10c59c488e691bdac608adea1d6572d0
@@ -1,3 +1,4 @@
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
@@ -103,7 +104,8 @@ data AuthRole

newtype AuthStatus = AuthStatus
{ _authStatusAuthRole :: AuthRole
} deriving (Show, Eq, Generic, FromJSON, ToJSON)
} deriving stock (Show, Eq, Generic)
deriving anyclass (FromJSON, ToJSON)

data GithubEndpoints = GithubEndpoints
{ _githubEndpointsAuthLocation :: !Request
@@ -1,6 +1,7 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
@@ -98,11 +99,13 @@ instance ToJSON NewGist where
data NewGistFile = NewGistFile
{ _newGistFilename :: !Text
, _newGistFileContent :: !Text
} deriving (Show, Eq, Generic, FromJSON)
} deriving stock (Show, Eq, Generic)
deriving anyclass (FromJSON)

newtype GistId =
GistId Text
deriving (Show, Eq, Generic, FromJSON, ToJSON)
deriving stock (Show, Eq, Generic)
deriving anyclass (FromJSON, ToJSON)

instance ToHttpApiData GistId where
toQueryParam (GistId gistId) = gistId

0 comments on commit b6b539a

Please sign in to comment.