<div dir="ltr">Hi All,<br>     Not particularly happy to announce the non-release of my latest library, HBlog 0.1. I&#39;ve been working on it steadily for a long time now, but it&#39;s still not ready.<br><br>     The library -- when it&#39;s finished -- will be a 100% Haskell representation of blogs, from authors and posts up to the most abstract notion of an entire blog as a Haskell data type.<br>
<br>     I&#39;d like to finish the library sometime, but I&#39;ve been so busy! Any spare time I&#39;ve had, I&#39;ve just ended up watching TV. I&#39;ve been so caught up with the final season of The Office, I didn&#39;t realize how much time had passed since I originally had the idea! (2 years.) Didn&#39;t it seem like Jim and Pam were going to break up a couple <br>
weeks ago?!<br><br>     Anyway, here&#39;s the code I&#39;ve definitely settled on so far:<br><br>data Author = Author { name :: String }<br>   deriving (Show, Eq)<br><br>data Post = Post { title   :: String<br>                 , body    :: String<br>
                 , authors :: [Author] }<br>   deriving (Show)<br><br>data Blog = Blog [Post]<br><br>hasSingleAuthor :: Post -&gt; Bool<br>hasSingleAuthor post = 1 == (length $ authors post)<br><br>     Feel free to use portions of this code in your own projects! Just be sure to put at the top of all your source files: &quot;Portions of this code (c) 2013 Tom Murphy. All rights reserved.&quot;<br>
<br>ROADMAP:<br> -- Lenses sound pretty cool, so I&#39;ve started writing lenses for the Author type, as well as finding out what a lens is. Maybe one day there&#39;ll be lenses for the Post type, too -- keep your fingers crossed!<br>
 -- One time when I was walking home from work, I had the idea for blogs being modeled as monads. Wouldn&#39;t that be awesome?: &quot;The Blog Monad.&quot; I haven&#39;t done it yet, though, because I haven&#39;t figured out what bind would do. If you figure out how to model blogs as monads, just be sure to include this in all of your sourcefiles: &quot;Idea for blog monad (c) 2013 Tom Murphy. All rights reserved.&quot;<br>
<br><br>Happy hacking!<br>Tom<br><br></div>