Skip to content

keys and kind erasure #105

Closed
Closed
@mniip

Description

@mniip

Consider the type of keys:

keys :: TypeRepMap f -> [SomeTypeRep]

this looks fine until you consider the kinds:

keys :: forall k (f :: k -> Type). TypeRepMap f -> [SomeTypeRep]

the value of k is erased! We can try to get it back by patching on SomeTypeRep and getting rep :: TypeRep (a' :: k') and typeRepKind rep:: TypeRep k', then we could try to testEquality, but that requires an extra Typeable constraint on the k, which isn't actually anywhere to be found if say the map is empty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions