{-# LANGUAGE DeriveGeneric #-}
module Data.Aeson.Unit(
Unit(..)
) where
import Control.Lens
import Data.Aeson
import Data.Swagger
import GHC.Generics
data Unit = Unit
deriving (forall x. Rep Unit x -> Unit
forall x. Unit -> Rep Unit x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Unit x -> Unit
$cfrom :: forall x. Unit -> Rep Unit x
Generic, Unit -> Unit -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Unit -> Unit -> Bool
$c/= :: Unit -> Unit -> Bool
== :: Unit -> Unit -> Bool
$c== :: Unit -> Unit -> Bool
Eq, Int -> Unit -> ShowS
[Unit] -> ShowS
Unit -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Unit] -> ShowS
$cshowList :: [Unit] -> ShowS
show :: Unit -> String
$cshow :: Unit -> String
showsPrec :: Int -> Unit -> ShowS
$cshowsPrec :: Int -> Unit -> ShowS
Show, ReadPrec [Unit]
ReadPrec Unit
Int -> ReadS Unit
ReadS [Unit]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Unit]
$creadListPrec :: ReadPrec [Unit]
readPrec :: ReadPrec Unit
$creadPrec :: ReadPrec Unit
readList :: ReadS [Unit]
$creadList :: ReadS [Unit]
readsPrec :: Int -> ReadS Unit
$creadsPrec :: Int -> ReadS Unit
Read, Int -> Unit
Unit -> Int
Unit -> [Unit]
Unit -> Unit
Unit -> Unit -> [Unit]
Unit -> Unit -> Unit -> [Unit]
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: Unit -> Unit -> Unit -> [Unit]
$cenumFromThenTo :: Unit -> Unit -> Unit -> [Unit]
enumFromTo :: Unit -> Unit -> [Unit]
$cenumFromTo :: Unit -> Unit -> [Unit]
enumFromThen :: Unit -> Unit -> [Unit]
$cenumFromThen :: Unit -> Unit -> [Unit]
enumFrom :: Unit -> [Unit]
$cenumFrom :: Unit -> [Unit]
fromEnum :: Unit -> Int
$cfromEnum :: Unit -> Int
toEnum :: Int -> Unit
$ctoEnum :: Int -> Unit
pred :: Unit -> Unit
$cpred :: Unit -> Unit
succ :: Unit -> Unit
$csucc :: Unit -> Unit
Enum, Unit
forall a. a -> a -> Bounded a
maxBound :: Unit
$cmaxBound :: Unit
minBound :: Unit
$cminBound :: Unit
Bounded)
instance ToJSON Unit where
toJSON :: Unit -> Value
toJSON Unit
_ = [Pair] -> Value
object []
instance FromJSON Unit where
parseJSON :: Value -> Parser Unit
parseJSON Value
_ = forall (f :: * -> *) a. Applicative f => a -> f a
pure Unit
Unit
instance ToSchema Unit where
declareNamedSchema :: Proxy Unit -> Declare (Definitions Schema) NamedSchema
declareNamedSchema Proxy Unit
_ = do
forall (m :: * -> *) a. Monad m => a -> m a
return forall a b. (a -> b) -> a -> b
$ Maybe Text -> Schema -> NamedSchema
NamedSchema forall a. Maybe a
Nothing forall a b. (a -> b) -> a -> b
$ forall a. Monoid a => a
mempty
forall a b. a -> (a -> b) -> b
& forall s a. HasType s a => Lens' s a
type_ forall s t a b. ASetter s t a b -> b -> s -> t
.~ forall a. a -> Maybe a
Just SwaggerType 'SwaggerKindSchema
SwaggerObject