
11 Sep
2015
11 Sep
'15
5:32 a.m.
An interesting fix, indeed! I think this might be a bug in GHC -- these should (if I understand correctly) be equivalent signatures. I'll try to find a simpler example too before reporting this, it might shed some light on things (maybe even enough to show this isn't a bug at all ^_^). On 09/11/2015 05:17 AM, Sumit Sahrawat, Maths & Computing, IIT (BHU) wrote:
One possible fix (tested on GHC-7.10.1 with lens-4.12.3):
test2 :: (Test a, t ~ TestT a) => t -> a test2 = view (from myiso)
This might have something to do with type families not being injective, but I'm not completely sure.
I also agree that it might be possible to trigger this without lens, will try to find an example and post if I succeed. -- Nikolay.