bennofs / th-lift-instances

Lift instances for common haskell data types
http://hackage.haskell.org/package/th-lift-instances
Other
12 stars 11 forks source link

Use StringPrimL for all buffer types #4 #5

Open mgsloan opened 8 years ago

mgsloan commented 8 years ago

This drastically improves compiletime, and usually runtime as well.

mgsloan commented 8 years ago

This changes most of the code in the package and adds quite a bit more. If you don't want to maintain this code, I can add these to th-orphans. Then, this package could release a version that re-exports th-orphans.

bennofs commented 8 years ago

I'm a bit surprised by how hard it is to efficiently create literal data for those types. How would I, as a GHC user, have a huge bytestring literal in my source code (not using TH)? Would that exhibit the same performance problems?

I will probably still accept the PR after I reviewed all of it, but is this a bug in GHC as well?

bennofs commented 8 years ago

Also, there are travis failures (you can ignore the GHC 7.10 one, that is a problem with the travis script, I'll fix that myself)

bennofs commented 8 years ago

Ok, I have reviewed everything and added comments where I have questions. Still a little bit worried about having so much code using internals, but looks like there is no other way.