Shape of a datatype.
Constructors
EnumerationA simple enumeration.
SumOfProductsA product or a sum of non-unit products.
MixedMixed sum type with both unit and non-unit constructors.
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27
Moduleswagger2-2.8.9Haskell2010
Shape of a datatype.
EnumerationA simple enumeration.
SumOfProductsA product or a sum of non-unit products.
MixedMixed sum type with both unit and non-unit constructors.
A combined shape for a product type.
ProdCombine 'Mixed b = 'MixedProdCombine a 'Mixed = 'MixedProdCombine a b = 'SumOfProductsA combined shape for a sum type.
TypeHasSimpleShape t f = GenericHasSimpleShape t f (GenericShape (Rep t))GenericHasSimpleShape t f 'Enumeration = ()GenericHasSimpleShape t f 'SumOfProducts = ()GenericHasSimpleShape t f 'Mixed = TypeError (((((('Text "Cannot derive Generic-based Swagger Schema for "
':<>: 'ShowType t) ':$$: ('ShowType t ':<>: 'Text " is a mixed sum type (has both unit and non-unit constructors)."
)) ':$$: 'Text "Swagger does not have a good representation for these types."
) ':$$: (('Text "Use "
':<>: 'Text f) ':<>: 'Text " if you want to derive schema"
)) ':$$: 'Text "that matches aeson's Generic-based toJSON,"
) ':$$: 'Text "but that's not supported by some Swagger tools."
)Infer a TypeShape for a generic representation of a type.
type GenericShape (C1 c U1) = 'EnumerationDefined in swagger2-2.8.9 · Data.Swagger.Internal.TypeShapetype GenericShape (C1 c (S1 s f)) = 'SumOfProductsDefined in swagger2-2.8.9 · Data.Swagger.Internal.TypeShapetype GenericShape (C1 c (f :*: g)) = 'SumOfProductsDefined in swagger2-2.8.9 · Data.Swagger.Internal.TypeShapetype GenericShape (D1 d f) = GenericShape fDefined in swagger2-2.8.9 · Data.Swagger.Internal.TypeShapetype GenericShape (f :*: g) = ProdCombine (GenericShape f) (GenericShape g)Defined in swagger2-2.8.9 · Data.Swagger.Internal.TypeShapetype GenericShape (f :+: g) = SumCombine (GenericShape f) (GenericShape g)Defined in swagger2-2.8.9 · Data.Swagger.Internal.TypeShape