Closed Gabriella439 closed 10 years ago
Sure, that doesn't seem too hard. I think I can generate it without the type signatures following mostly the same pattern that I've already got for makeLenses
. Pull requests welcome, or I'll probably get around to it myself this weekend.
@Gabriel439, I hacked up makeTraversals
(how's that name?) today. Try installing it from the git repo and let me know if this suits your needs. If you think it works okay then I'll go ahead and release it to hackage.
Note: Things that haven't been implemented yet:
I tried it and it works fantastic! In my case I only need single-field constructors and the inferred types, so this works great for me. Thanks a lot! :)
Okay, I just pushed lens-family-th v0.3 to hackage with this functionality. In other news, I also added lens-family-th to Stackage.
Would it be possible to add something like
makePrisms
fromlens
, except that it just generates traversals instead? The idea is that you have a data type like:... it would generate: