02:34:53 <stepkut> kxra: fixed the issue with the missing blog posts page
02:35:10 <kxra> stepkut: progress marches on!
02:35:23 <stepkut> \o/
02:35:35 <stepkut> but now I must clean
03:23:12 <donri> stepkut: so, staticFiles does seem useful http://hackage.haskell.org/packages/archive/yesod-static/
03:23:40 <stepkut> sure
03:24:17 <stepkut> I would be fine with adding something like that to web-routes
03:25:26 <donri> i'm thinking we want a new package for dealing with static files that deals with things like etags, date headers, ram-caching... and maybe this too then
03:26:12 <donri> uhm by date headers i mean, far-future expiration, and include a checksum in the routed path to bust old caches
03:26:34 <stepkut> sounds good to me
03:26:41 <stepkut> get right on it!
03:26:44 <donri> :)
03:29:46 <stepkut> :(
03:30:02 <donri> :o
03:38:18 <donri> bedtime
10:07:34 <chersanya> crash course gives this example of using RqData applicative functor: getDataFn $ (,) <$> look "greeting" <*> look "noun"
10:07:46 <chersanya> but how to make this work with more than 2 parameters?
13:24:41 <mercifulhop> Anyone know why, when I'm trying to do the HSP/HSX template section of the Happs crash course the following doesn't work?
13:25:03 <mercifulhop> bar :: (XMLGenerator m) => XMLGenT m (HSX.XML m)
13:25:11 <mercifulhop> bar = <span>bar</span>
13:26:01 <mercifulhop> It says the HSX.XML type constructor or class is not in scope
13:26:36 <mercifulhop> I have the line
13:26:36 <mercifulhop> import qualified HSX.XMLGenerator as HSX
13:26:47 <mercifulhop> it's right off the crash course :/
13:27:06 <mercifulhop> so I have no idea why it doesn't work...
14:44:24 <KBme> stepcut, so I have my reader, a runMonad function that does :: MyMonad a → MyEnv → IO a
14:45:00 <KBme> but it now complains that it doesn't have a ServerrMonad, FilterMonad and MonadPlus instances
15:11:44 <donri> KBme: is it a newtype?
15:12:57 <KBme> it is
15:13:01 <KBme> donri,
15:13:40 <donri> KBme: use the GeneralizedNewtypeDeriving extension to derive those classes for the newtype
15:14:08 <KBme> i am doing that
15:14:17 <KBme> but I can't figure out how to do it with servermonad
15:14:24 <KBme> here is what I have
15:14:59 <KBme> newtype MyMonad a = MyMonad (ReaderT MyEnv (ServerPartT IO) a)
15:15:32 <KBme> deriving (Monad, MonadReader MyEnv, MonadIO, MonadPlus)
15:15:48 <KBme> donri, ?
15:19:42 <KBme> how would I add instances for ServerMonad and FilterMonad?
15:40:55 <donri> same as with MonadReader
15:41:27 <donri> well ServerMonad is just like Monad
15:41:59 <donri> but you derive FilterMonad Response
15:42:01 <KBme> yeah, i figured that one out
15:42:22 <KBme> i mean the SErverMonad
15:42:31 <KBme> ah, that works
15:42:39 <KBme> FilterMonad Response…sweet
15:42:40 <KBme> thanks
15:43:44 <donri> may also want: WebMonad, HasRqData, Happstack
15:43:56 <KBme> ah, yes, i do
15:44:05 <KBme> let me see if I can figure them out
15:45:07 <donri> may need to do Happstack separate like: instance Happstack MyMonad
15:45:10 <donri> that's it
15:45:16 <KBme> oh wow
15:45:18 <KBme> sweet
15:45:36 <KBme> i was hoping I wouldn't need to manually type the instance declarations…
15:45:44 <donri> or maybe you can deriving (Happstack), not sure
15:45:53 <KBme> is there a way to make ghc actually print the instance declarations?
15:46:04 <donri> well Happstack is just a class alias so there's no methods
15:46:37 <donri> what do you mean by declarations?
15:46:44 <donri> ghc doesn't know source code if that's what you mean
15:46:55 <KBme> yeah
15:46:58 <KBme> ah well
15:47:07 <donri> but you can get some things with :i in ghci
15:47:10 <KBme> i just don't really like to leave language extensions in my package
15:47:29 <KBme> i mean I don't like to depend on language extensions
15:47:33 <donri> you're pretty much going to have to use extensions with happstack
15:47:41 <KBme> oh?
15:48:23 <donri> yea... FilterMonad is an MPTC, web-routes uses type families ...
15:48:38 <KBme> ok
15:48:47 <KBme> well, i like to keep that at the minimum level
15:49:01 <KBme> I mean my project requires me to use happstack, so there is nothing to say there
22:20:57 <sclv> dear lazy irc, what's the easiest function of type: Data.Text.Lazy.Internal.Text
22:20:57 <sclv>                                   -> ServerPartT m0 Response
22:21:27 <donri> sclv: toResponse
22:21:32 <sclv> ah, duh :-)
22:21:37 <donri> :)
22:21:54 <donri> it'll be text/plain though
22:27:48 <donri> stepcut: hm i think maybe the bytestring instances for ToMessage should be application/octet-stream ?
22:28:37 <donri> AFAIK it's the text/plain of binary data
22:44:05 <sclv> how do i convince it to be text/html or w/e?
22:44:37 <sclv> i know i can look it up, but i feel a bit lazy
22:45:31 <donri> sclv: you could modify the response, you could newtype Text and write a new ToMessage instance, you could use the builtin blaze-html stuff and toHtml
22:45:58 <sclv> ah so toResponse . toHtml does it?
22:46:01 <donri> toHtml if you want it escaped
22:46:09 <donri> otherwise you need some other blaze function
22:46:10 <sclv> oh no, this is raw html that happens to be in a text
22:46:51 <donri> preEscapedToHtml, then
22:47:21 <sclv> toResponseBS let me just pass in a type, that's why i'm confused...
22:47:31 <sclv> like I'd prefer the equiv toResponseText...
22:48:43 <donri> well sure you could use toResponseBS and encode the text into a bytestring
22:48:57 <donri> but the blaze way does all that for you
22:49:03 <sclv> ah