21:25:02 <KBme> hi
21:25:28 <stepkut> hi
21:25:39 <KBme> should this ever happen: No instances for (Control.Monad.MonadPlus ((→) HST.Response), Happstack.Server.Internal.Monads.ServerMonad ((→) HST.Response))
21:25:41 <KBme> ?
21:26:12 <KBme> I'm trying to use Happstack.server.routing.method
21:26:26 <stepkut> I suspect you used it incorrectly
21:26:31 <stepkut> what does your code look like?
21:26:39 <KBme> ah you might be right
21:27:01 <KBme> well
21:28:02 <hpaste> KBme pasted “routefilters?” at http://hpaste.org/78374
21:28:53 <KBme> ok, disregard the redundant dos and $s, I always run hlint before commiting ;)
21:29:02 <KBme> I was just trying a bunch of different methods
21:31:16 <KBme> oh, and mystatemonad should have instances for ServerMonad, FilterMonad, hasrqdata, webmonad, monadplus, monadio …
21:31:29 <KBme> but there is a MatchMethod monad I should also make an instance for?
21:33:08 <stepkut> no
21:33:09 <stepkut> one moment
21:33:42 <stepkut> this:
21:33:43 <stepkut> HSR.method HST.POST >> HSRE.ok $ HSRE.toResponse $ "You did a POST on /login"
21:33:53 <stepkut> acts as if you had parens like this:
21:34:02 <stepkut> (HSR.method HST.POST >> HSRE.ok) $ HSRE.toResponse $ "You did a POST on /login"
21:34:16 <stepkut> but you are expecting it to have parens like:
21:34:21 <stepkut> HSR.method HST.POST >> (HSRE.ok $ HSRE.toResponse $ "You did a POST on /login")
21:35:08 <stepkut> if you want to put it all on one line you could do:
21:35:09 <stepkut> do HSR.method HST.POST ; HSRE.ok $ HSRE.toResponse $ "You did a POST on /login"
21:35:13 <stepkut> and use ; instead of >>
21:35:22 <stepkut> or you can add the parens that you want
21:39:30 <KBme> ah
21:39:32 <KBme> newlines
21:39:35 <KBme> gosh
21:39:58 <stepkut> :)
21:40:31 <KBme> well
21:40:43 <KBme> I added the newlines after the >>s, is that correct?
21:40:52 <stepkut> no
21:41:03 <stepkut> well, it won't change anything
21:41:15 <KBme> yeah, it didn't ☺
21:41:32 <KBme> oh, so I don't need the >>s
21:41:33 <KBme> hmmm
21:41:36 <stepkut> right
21:41:49 <KBme> but why?
21:42:13 <KBme> If I remove the << it still doesn't work
21:42:44 <hpaste> KBme pasted “new route filter” at http://hpaste.org/78376
21:42:48 <KBme> gah
21:42:54 <KBme> forgot to obfuscate the code
21:42:56 <KBme> ah well
21:43:10 <KBme> stepcut, ^
21:43:12 <stepkut> you need some 'do' in there and you need to line the statements up
21:43:29 <hpaste> stepcut annotated “new route filter” with “new route filter (annotation)” at http://hpaste.org/78376#a78377
21:43:33 <stepkut> something like that probably
21:44:35 <KBme> all right, i'll try that. thanks.
21:45:15 <KBme> yep
21:45:54 <stepkut> do you understand why?
21:46:41 <KBme> not really
21:46:44 <stepkut> they issue here is just that the precedence of >> and $ are not mixing the way you expect
21:46:50 <KBme> also, it compiles but doesn't seem to work
21:47:10 <KBme> I do a get on /login but I get a 404
21:49:47 <hpaste> stepcut annotated “new route filter” with “new route filter (annotation) (annotation)” at http://hpaste.org/78376#a78378
21:49:51 <stepkut> that works for me
21:50:25 <stepkut> $ curl http://localhost:8000/login
21:50:25 <stepkut> you did a GET on /login
21:51:12 <KBme> hm, so my problem is before that
21:51:28 <KBme> ok, this is part of a route module, that is itself called from inside an msum
21:51:32 <KBme> could that be a problem?
21:51:55 <KBme> so this msum is inside of an other msum that is the argument to simpleHTTP
21:54:39 <KBme> ok, my bad
21:54:47 <KBme> forgot to add it to the main msum
21:54:50 <KBme> ACTION blushes
21:54:59 <stepkut> \o/
21:58:19 <KBme> hurray, it works. Thanks for your help, stepcut
21:58:27 <stepkut> no problem!
21:58:31 <stepkut> glad it's working!