18:14:33 <donri> stepcut: wall of text, horay https://github.com/acid-state/acid-state/issues/7
18:17:53 <stepcut> \o/
18:17:58 <stepcut> I'm gluing my house together
18:20:14 <donri> stepcut: sounds like php
18:20:24 <stepcut> haha
18:27:15 <donri> stepcut: would be nice to have some logging support in acid-state. especially for remote and connections. maybe also for stuff like "wrote X updates to disk" or whatever, at least for debugging
18:27:37 <donri> i'm thinking that's another use cases for config records
18:29:38 <stepcut> neat
19:22:11 <stepcut> I wonder if there is a reform-like thing hiding somewhere inside pipes
20:31:20 <Placinta> Hi. Could anyone point me into the direction how I could use persistent with Happstack? How would I decorate the ServerPart monad with a SqlPersistT monad?
20:57:06 <stepkut> you could either put the SqlPersistT inside the ServerPartT or outside it
20:57:39 <stepkut> I would generally use a newtype and newtype deriving so that I can deriving all the classes needed to avoid having to call 'lift' all over the place
21:02:18 <Placinta> stepkut: It kind of works, although I am in the dark related to how all of it interconnects..
21:15:26 <donri> probably neither of those transformers provide the instances for the other so you'll probably have to write them yourself or use explicit lifts
21:20:12 <Placinta> donri: Yes, they don't have the instances. Problem is this is my first hands-on approach on transformers, so I'm not sure how I can nest do notation, and where do the according lifts have to be.
21:21:24 <donri> Placinta: you just prepend "lift $" to any computation of the inner monad
21:34:16 <Placinta> donri: Could you adive if my logic is correct? I have a function that should return a ServerPart Response. Inside the function I have to use a SqlPersist monad (so do notation). Using it I extract a value (a list from the database). And then I have to use that value, to return a ServerPart. Problem is if I want to use the value in the do block, the return value will be of type SqlPersist, instead of ServerPart. Can a lift help me here?
21:36:29 <donri> lift would help if your handler is type ServerPartT (SqlPersistT IO) Response
21:38:10 <donri> you then transform that to ServerPartT Response using mapServerPartT with some persistent function for running the SqlPersistT monad
21:39:12 <donri> it might be easier to flip this stack over though, lift the happstack functions instead
21:39:39 <donri> handler code will probably be more verbose that way though
21:39:53 <donri> but you won't need to deal with mapServerPartT
21:42:25 <donri> then you have something like, simpleHTTP nullConf $ runSqlPersistM yourHandler yourSqlConnection
21:42:34 <Placinta> donri: Do I have to explicitly create the stack? Like invoking a constructor, or is there another way?
21:42:45 <donri> nah, you just lift
21:43:26 <Placinta> donri: Oh dear. Well thanks very much your help! I'll try to dig at it further.
21:43:35 <Placinta> for your*
21:55:50 <Placinta> donri: If I understand correctly, I will for sure have either runSqlPersistT or runServerPartT at the top level of the main function?
21:58:02 <donri> Placinta: you can't do runServerPartT because you need a serverpart to pass to simpleHTTP
21:58:31 <donri> so you either need to mapServerPartT or runSqlPersistM
21:58:31 <Placinta> donri: oh right. it probably does it inside
22:00:18 <donri> uh you need runSqlPersistM either way rather