Skip to content

Support promoting/singling invisible type patterns #583

@RyanGlScott

Description

@RyanGlScott

GHC 9.10 introduces the ability to use invisible type patterns. As such, examples like this can now be written:

id :: a -> a
id @t x = x :: t

The question is: can we promote and single these definitions? It seems plausible, given that we can write the following:

type Id :: a -> a
type family Id x where
  Id @t x = x :: t

sId :: (forall (x :: a). Sing x -> Sing (Id x) :: Type)
sId @t (sX :: Sing x) = sX :: Sing (x :: t)

We should see if this is doable. See also #565.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions