Is mkTrApp unsafe?

Andrew Martin andrew.thaddeus at gmail.com
Sat Apr 15 13:00:09 UTC 2017


Ah, I had never used pattern synonyms before, and I did not really that pattern synonyms could be bidirectional. That's good to know. It seems like mkTrApp should be removed then unless there are any restrictions on partially applying pattern synonyms.

Sent from my iPhone

> On Apr 14, 2017, at 11:51 PM, David Feuer <david.feuer at gmail.com> wrote:
> 
> Yes, I believe you are correct that mkTrApp is safe, and probably
> should not be exported by Type.Reflection.Unsafe. However, it's not so
> clear to me that it should be exported by Type.Reflection. You should
> just be able to use App, both to construct and deconstruct type
> applications.
> 
> David
> 
> On Fri, Apr 14, 2017 at 8:02 PM, Andrew Martin
> <andrew.thaddeus at gmail.com> wrote:
>> I've been playing around with the GHC 8.2 release candidate. In
>> Type.Reflection.Unsafe, there's a really handy function named mkTrApp.
>> Everything else in that module is pretty evidently unsafe, but I'm not
>> so sure about mkTrApp. I'm wondering if it should actually be exported
>> by Type.Reflection instead or if I've missed some way it could be used
>> to create an ill-kinded TypeRep.
>> 
>> -Andrew Martin
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries


More information about the Libraries mailing list