08:39:04 how to match root path? nullDir ? 10:57:26 how to put ServerPartT into ErrorT transformer? 12:14:03 documentation in http://happstack.com/docs/0.4/happstack-server/Happstack-Server-SimpleHTTP.html#v%3AmapServerPartT it rather bad 12:14:15 *is rather bad 12:26:01 yes 12:26:17 you may want to look at the source code, usually it makes things clearer 12:27:46 HugoDaniel: at the source code of what? 12:33:56 SimpleHTTP.hs 12:34:32 haskell is a very simple language to read... thats why i like it, its very maintainable compared to the other alternatives 12:34:59 so a quick look at the source code usually tells much more than a fully written haddock 12:35:22 so, you want to put a serverpartT into an errorT or the other way around ? 12:37:55 I want ability to call throwError in my handlers code and output a pretty error page 13:55:59 rdtsc: like this here: http://hpaste.org/fastcgi/hpaste.fcgi/view?id=17084#a17084 ? 13:58:08 there's probably a nicer solution that that though 13:59:32 aavogt: do you know right variant of this http://happstack.com/docs/0.4/happstack-server/Happstack-Server-SimpleHTTP.html#v%3ArunServerPartT ? 14:00:07 what do you mean be right? 14:01:12 aavogt: to be a compileable first of all 14:01:27 well that depends on the context... 14:01:46 i tell about the example in documentation 14:02:15 Left err -> return $ Just (Left Catastrophic failure ++ show e, Set $ Endo r -> r{rsCode = 500}) 14:02:22 this is a terrible thing 14:03:36 a lambda didn't make it: http://happstack.com/docs/0.4/happstack-server/src/Happstack-Server-SimpleHTTP.html#mapServerPartT 14:03:38 aavogt: thanks a lot for your example, i will try it 14:04:57 stepcut: typo on the site: "darcs get --lazy darcs get http://patch-tag.com/r/mae/happstack" at http://happstack.com/develop.html 14:05:00 that is it? i am confused 14:05:08 @type Endo 14:05:09 forall a. (a -> a) -> Endo a 14:05:36 > (Endo \r -> r+1) `appEndo` 2 14:05:37 : parse error on input `\' 14:05:42 > (Endo $ \r -> r+1) `appEndo` 2 14:05:43 3 14:06:01 @type appEndo 14:06:02 forall a. Endo a -> a -> a 14:11:25 rdtsc: hmm, WebT already has a MonadError instance... 14:11:56 so i guess adding one more transformer in there is duplicating some code 14:12:17 aavogt: as far as i understand, it uses ErrorT for some internal tasks 14:28:10 04 Feb 14:27 - fixed type regarding darcs get (Jeremy Shaw) 14:29:35 stepcut: I also sent a couple patches for documentation formatting 14:42:08 aavogt: why is that way of doing it better? 14:42:33 because you don't need to escape \"strings\" and stuff? 14:44:21 exactly, it's easier than finding all the places where stuff wasn't escaped 14:44:34 see rdtsc's confusion 14:48:52 nifty 14:49:11 I pushed it 14:50:58 typo on the website should be fixed now too 14:54:56 aavogt: how to use your monad with simpleHTTP ? i'm not familiar with newtype :-[ 15:25:05 rdtsc: well you have a function to convert back to (ServerPartT IO a), which is what simpleHTTP takes 15:26:19 aavogt: which type signature should I write to my handler? 15:30:18 depends where you apply the function to convert it back to (ServerPartT IO b) 15:31:59 anyways, the happstack doc example (though it had a couple errors in formatting which should be fixed now) probably does the right thing with respect to setting stuff in the http response (such that the browser knows there is an error) 15:32:41 the fact that it is a newtype doesn't really matter: just look at the types of the functions you have, and then see how you can match them up 15:33:35 I have such functions :: ServerPartT (ErrorT String IO) Response 15:34:49 right, you don't have to use a newtype 15:36:14 use of (mapServerPartT (fmap makeErrorPage . runErrorT)) :: ServerPartT (ErrorT String IO) x -> ServerPartT IO x 15:44:52 aavogt: this matter is clear now. if you can to patch documentation, please, change the example http://happstack.com/docs/0.4/happstack-server/src/Happstack-Server-SimpleHTTP.html#mapServerPartT to something like that http://codepad.org/yWPv63eR 15:49:09 http://codepad.org/7BNBd4M1 hlinted version 15:49:27 rdtsc: I think the \r -> r{rscode = 500} is important 15:49:48 otherwise the http response is probably going to be ok rather than server error 15:49:59 aavogt: It doesn't work, I still get 200 response 15:50:08 even with \r -> r{rscode = 500} 15:51:57 there is serious errors in original function, \r -> r{rscode = 500} is not matter 15:52:11 it's just missing a $ before the lambda 15:52:30 aavogt: that about two arguments? 15:52:33 that should be fixed with the patch stepcut applied earlier today 15:53:31 oh no, it still has two arguments 15:53:56 the handler one is unused and should be removed 15:54:03 and String returning as Response 15:56:21 Set $ Endo \r -> r{rsCode = 500} is also wrong, it should be Set $ Dual $ Endo $ \r -> r{rsCode = 500} 15:56:45 imho 15:57:30 hehe, there are quite a few things to fix once I try to run that function 15:57:40 exactly 16:19:20 stepcut: do you use happstack with a rdbms? 16:24:13 how to customize "file not found" message from 'fileServe' function? 18:12:14 stepcut, saw your mail. Often, this means the attachment wasn't saved intact from your mail client - darcs is very sensitive about this (indentation etc) 18:12:37 it's not possible to extract a darcs patch from apple mail afaik 18:12:46 I have to log in to webmail when I get one 18:13:59 this will be easier: pull from http://joyful.com/repos/happstack 18:47:59 also the encoding of the text in the patch can be wrong 18:58:00 it's a pain. gzip encoding of sent patches is on the wishlist 20:38:00 sm: when you send the patch it was not sent as an attachment.. it was just in-line in the message.. I am not sure why that happens sometimes.. 20:38:34 anyway, the pull worked fine :) 20:38:56 good