Proposal: k ~ l => IsLabel k (Proxy l)

Fumiaki Kinoshita fumiexcel at gmail.com
Tue Jul 7 08:47:55 UTC 2020


I propose adding an IsLabel instance to Proxy where

   fromLabel = Proxy

This is the only reasonable instance I can think of, and AFAIK there's no
plan which would conflict [0].

The proposed instance allows us to explore API designs involving type-level
strings with much less syntactic noise ( #foo is easier to type
than @"foo"). I admit that the motivation is weak, but I think it's nice to
have.

[0]
https://gitlab.haskell.org/ghc/ghc/-/wikis/records/overloaded-record-fields/magic-classes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20200707/2efdd66a/attachment.html>


More information about the Libraries mailing list