
4 Oct
2014
4 Oct
'14
8:44 a.m.
Il giorno 04/ott/2014, alle ore 13:03, Benjamin Edwards
The compiler automatically provides accessor functions already. You can't have more than one function with the same name in the same module without a qualified import.
Yes, that’s exactly the problem solved by makeFields. You declare the fields with a different name for each type but you get a lens with the same name for each type by declaring the suitable type class and instances. What I was asking is if is it possible to do the same generating simple functions instead of lenses. The functions generated by the compiler with the record syntax are not what I want, because the name must be unique for any single type.
Ben
Thanks, Nicola