@@ -2,6 +2,7 @@
2{-# LANGUAGE FlexibleContexts #-}
2{-# LANGUAGE FlexibleContexts #-}
3{-# LANGUAGE FlexibleInstances #-}
3{-# LANGUAGE FlexibleInstances #-}
4{-# LANGUAGE KindSignatures #-}
4{-# LANGUAGE KindSignatures #-}
5+{-# LANGUAGE PolyKinds #-}
5{-# LANGUAGE ScopedTypeVariables #-}
6{-# LANGUAGE ScopedTypeVariables #-}
6{-# LANGUAGE TypeOperators #-}
7{-# LANGUAGE TypeOperators #-}
7{-# LANGUAGE TypeSynonymInstances #-}
8{-# LANGUAGE TypeSynonymInstances #-}
@@ -149,7 +150,7 @@ instance {-# OVERLAPPING #-} (Selector s, ToSchema c) => GToSchema (S1 s (K1 i (
149 & schemaType .~ SchemaObject
150 & schemaType .~ SchemaObject
150 & schemaProperties . at fieldName ?~ Inline fieldSchema
151 & schemaProperties . at fieldName ?~ Inline fieldSchema
152− fieldName = T.pack (fieldLabelModifier opts (selName (undefined :: S1 s f p)))
153+ fieldName = T.pack (fieldLabelModifier opts (selName (Proxy3 :: Proxy3 s f p)))
153 fieldSchema = toSchema (Proxy :: Proxy c)
154 fieldSchema = toSchema (Proxy :: Proxy c)
155-- | Record fields.
156-- | Record fields.
@@ -163,9 +164,11 @@ instance {-# OVERLAPPABLE #-} (Selector s, GToSchema f) => GToSchema (S1 s f) wh
163 & schemaProperties . at fieldName ?~ Inline fieldSchema
164 & schemaProperties . at fieldName ?~ Inline fieldSchema
164 & schemaRequired %~ (fieldName :)
165 & schemaRequired %~ (fieldName :)
166− fieldName = T.pack (fieldLabelModifier opts (selName (undefined :: S1 s f p)))
167+ fieldName = T.pack (fieldLabelModifier opts (selName (Proxy3 :: Proxy3 s f p)))
167 fieldSchema = gtoSchema opts (Proxy :: Proxy f) mempty
168 fieldSchema = gtoSchema opts (Proxy :: Proxy f) mempty
169instance ToSchema c => GToSchema (K1 i c) where
170instance ToSchema c => GToSchema (K1 i c) where
170 gtoSchema _ _ _ = toSchema (Proxy :: Proxy c)
171 gtoSchema _ _ _ = toSchema (Proxy :: Proxy c)
173+data Proxy3 a b c = Proxy3