Skip to content

Wingman doesn't respect fundeps #2610

Closed
@isovector

Description

@isovector

Preamble:

class Monoid doc => HasObject doc ndoc | doc -> ndoc, ndoc -> doc where
instance HasObject SwaggerDoc NamedSwaggerDoc where

object ::
  HasObject doc doc' =>
  Text ->
  SchemaP doc A.Object [A.Pair] a b ->
  SchemaP doc' A.Value A.Value a b

class ToSchema a where
  schema :: ValueSchema NamedSwaggerDoc A.Value A.Value a a

if we check in the context of this:

instance ToSchema Rec where
  schema = [wingman| use object
                   , use undefined
                   |]

we get a hole ⊢ SchemaP doc Object [Pair] Rec Rec

but this should actually be SchemaP SwaggerDoc Object [Pair] Rec Rec as per the fundep.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: wingmantype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions