Skip to content

Wingman doesn't introduce new skolems for existentially bound variables #1689

Closed
@isovector

Description

@isovector

@masaeedu points out:

{-# LANGUAGE DataKinds, GADTs #-}

data Z ab where
  Z :: (a -> b) -> Z '(a, b)

test :: Z ab
test = _

produces

test = Z id

But it doesn't typecheck.

What's going wrong here? When we introduce the Z constructor, we should generate two new skolems a and b such that '(a, b) ~ ab. But instead we generate two new unification variables, which are thus free to unify with one another, and thus produce the bogus id.

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