yesodweb/shakespeare — pull request #110 by bogiebro (2013-08-16 13:23:47+00:00)
Title: change of toBuilder type

I noticed that all the datatypes using the simple Text.Shakespeare interface (Text and Javascript) have to have datatypes that are simply a wrapper around a Builder. To convert a value into Javascript, for instance, we need to use toBuilder, followed by wrap. If the conversion required the creation of something more than a Builder, we'd be screwed. A more flexible approach would be to have toBuilder convert directly into the target type. This would allow shakespeare to build any type that has a Monoid instance, not just wrappers over Builders. Only shakespeareFileReload requires a raw Builder value, and will not work with general Monoid types.