<div dir="ltr">Of course, I forgot to actually link to the package candidate. Whoops!<div>Here it is:</div><div><br></div><div><a href="http://hackage.haskell.org/package/lazify-0.1.0.0/candidate">http://hackage.haskell.org/package/lazify-0.1.0.0/candidate</a><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 6, 2019 at 3:25 AM David Feuer <<a href="mailto:david.feuer@gmail.com">david.feuer@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I've put together a small package for lazifying record types. There's a "classy" version in Data.Lazify and a Generic-only version in Data.Lazify.Generic. A few examples are below. I'd love to hear comments on what looks good and what should be changed before I make the first release. As usual, names are the hardest part. Note especially that the operator ($~) is defined in *both* Data.Lazify and Data.Lazify.Generic, and that no operator corresponds to genericLazify. Hrmm mumble.<div><br></div><div>lazify (1, 2) = (1, 2)</div><div>lazify undefined = (_|_, _|_, _|_)</div><div>lazify undefined = Sum (_|_, _|_, _|_)</div><div><br></div><div>genericLazify (1,2) = (1,2)</div><div>genericLazify undefined = (_|_, _|_, _|_)</div><div>genericLazify (Sum (MyCon x y)) = ... oops, MyType isn't an instance of Lazifiable</div><div><br></div><div>lazifyGeneric (1,2) = (1,2)</div><div>lazifyGeneric undefined = (_|_, _|_, _|_)</div><div>lazifyGeneric (Sum (MyCon x y)) = Sum (MyCon x y)</div><div><br></div><div>Thanks in advance,</div><div>David</div></div>
</blockquote></div>