Skip to content

Clean up template Haskell #69

Closed
tfausak opened this Issue Jul 31, 2014 · 5 comments

1 participant

@tfausak
Owner
tfausak commented Jul 31, 2014

The code I introduced in #68 is pretty gross. I don't really know how to make it better.

There are two things in particular I want to make better:

  1. Use some kind of map to reduce duplication in Strive.Internal.Lenses. Check it out: https://github.com/tfausak/strive/blob/50e20c41d1703ffec32af5f674badc3856635388/library/Strive/Internal/Lenses.hs#L16-L64.

  2. Use quasi quotes to make template Haskell less verbose. This is crazy: https://github.com/tfausak/strive/blob/50e20c41d1703ffec32af5f674badc3856635388/library/Strive/Internal/TH.hs#L101-L104.

@tfausak
Owner
tfausak commented Jul 31, 2014

I think the things in Control.Monad will come in handy.

@tfausak
Owner
tfausak commented Aug 2, 2014

Making multiple lenses at the same time is going to be kind of difficult, since I have to only define each lens class once. I might need to do two passes; one to collect the fields and another to define the unique classes.

@tfausak tfausak added this to the v0.7.0 milestone Aug 11, 2014
@tfausak tfausak removed this from the v1.0.0 milestone Apr 6, 2015
@tfausak
Owner
tfausak commented Apr 6, 2015

Since this will be an internal change, it shouldn't hold up the v1.0.0 release.

@tfausak
Owner
tfausak commented Aug 25, 2015

I think makeFields will do what I want.

@tfausak tfausak self-assigned this Sep 11, 2015
@tfausak tfausak removed the help wanted label Sep 11, 2015
@tfausak
Owner
tfausak commented Sep 11, 2015

Oh, right. I don't depend on lens. And microlens-th's makeFields doesn't handle multiple classes automatically.

@tfausak tfausak added the help wanted label Oct 5, 2015
@tfausak tfausak removed their assignment Nov 21, 2015
@tfausak tfausak added the wontfix label Jan 29, 2016
@tfausak tfausak self-assigned this Jan 29, 2016
@tfausak tfausak closed this Jan 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.