Experimental IRC log happs-2008-04-11

Available formats: content-negotiated html turtle (see SIOC for the vocabulary)

Back to channel and daily index: content-negotiated html turtle

These logs are provided as an experiment in indexing discussions using IRCHub.py, Irc2RDF.hs, and SIOC.

17:50:28<nomeata>Hi. With 0.9.2, is there a way to set the server to automatically re-compile itself? Would save a lot of "Ctrl-C ↑ ENTER" presses.
18:06:35<nomeata>and what is a good way to propagate errors from the State update functions to the user?
18:15:42<nomeata>hmm, this does not work:
18:15:43<nomeata>addOffer :: (MonadState State m, MonadError String m) => StashId -> Offer -> m ()
18:16:16<nomeata>because there is no instance for (MonadError String (Ev (Control.Monad.State.Lazy.StateT State GHC.Conc.STM)))
18:17:51<nomeata>the alternative would be to use addOffer :: MonadState State m => StashId -> Offer -> m (Either String ()) but that sounds like a lot of manual work
18:19:30<nomeata>so either way does not sound like a good way. anyother suggestions?
18:25:11<Saizan>you can use MonadError inside the state functions and wrap them in runErrorT
18:26:07<Saizan>propagating the result to the user of query/update must pass via something like Either
18:26:14<Saizan>s/result/error/
18:27:01<nomeata>Saizan: but then the error is back to a normal value, passed through the query stuff, and on the other side I have to put it back into another ErrorT (or something)
18:28:09<nomeata>so I could write something like myQuery :: (QueryEvent ev (Either e res), Control.Monad.Trans.MonadIO m, ErrorMonad e m) => ev -> m res
18:28:54<nomeata>so on the user side of query (now myQuery), there is no overhead. But I can not avoid the runErrorT, can I?
18:35:58<nomeata>hmm, actually not too bad, "runErrorT $ do" at the beginning. And when myQuery turns an error into a "Escape (..)", it might become a usable system for error handling.
19:18:16<Saizan>you can instance MonadError for WebT i think?
20:37:02<nomeata>but I would still need a custom myQuery, right?
21:05:50<nomeata>I did an "instance Monad m => MonadError String (WebT m)", but I had problems with the catchError implentation, because when I store the error message string in the Escape Response, I can’t easily get it back for the handler
21:10:20<nomeata>I guess I’m better off without catchError, hopefully I won’t need it
22:27:19<nomeata>oh, nice, trying to add that instance to HAppS ghc produces compiler errors
22:29:34<nomeata>unfortunately it disappears with a setup.lhs clean
23:14:25<nomeata>I sent a patch with some error handling functions to the mailing list. Enjoy, and good night :-)

Back to channel and daily index: content-negotiated html turtle