Skip to content

Deprecate and eventually remove IsSymbol in favor of the Reflectable type class #4314

@purefunctor

Description

@purefunctor

Proposal

The type-level integers PR (#4207) introduced a poly-kinded type class for type reflection, aptly named Reflectable. Similarly, we plan to replace Symbol with String (#3103), similar to how type-level integers are kinded with the Int type. This proposal aims to deprecate the IsSymbol type class in favor of Reflectable, before eventually being removed in a v1 release of the compiler.

Examples

Any occurrence of IsSymbol can be substituted with Reflectable, and the same can be done with reflectSymbol into reflectType:

xs :: forall s. IsSymbol s => Proxy s -> String
xs = reflectSymbol

xs' :: forall s. Reflectable s String => Proxy s -> String
xs' = reflectType

We can add a Warn-ing to any consumers of the IsSymbol type class to use Reflectable instead.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions