Skip to content

HasSwagger instance of UVerb depends on overlappable HasSwagger instance of Verb #1488

@akshaymankar

Description

@akshaymankar

This is HasSwagger UVerb ... defined here

 instance 
   {-# OVERLAPPABLE #-} 
   ( ToSchema a, 
     HasStatus a, 
     AllAccept cs, 
     SwaggerMethod method, 
     HasSwagger (UVerb method cs as) 
   ) => 
   HasSwagger (UVerb method cs (a ': as)) 
   where 
   toSwagger _ = 
     toSwagger (Proxy :: Proxy (Verb method (StatusOf a) cs a)) 
       `combineSwagger` toSwagger (Proxy :: Proxy (UVerb method cs as)) 

it depends on overlappable instance HasSwagger Verb .. by calling toSwagger (Proxy :: Proxy (Verb method (StatusOf a) cs a)). When this instance is actually overriden in a dependant module, the HasSwagger instance for UVerb doesn't pick that up as it is already compiled and linked with the now overlapped instance. This makes it confusing to write custom instances for a special type.

Moved from: haskell-servant/servant-swagger#133

Metadata

Metadata

Assignees

No one assigned

    Labels

    uverbBugs and questions related to UVerb

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions