00:00:35 <donri> stepcut: did you get the patches?
00:00:43 <stepcut> yup
00:00:46 <stepcut> I'll apply them tomorrow
00:04:05 <donri> just checking
11:55:47 <morel> i want to set up a blog with (tree-like) categories and a search function and i want to write blog-posts in a markup language.  is clckwrks what i want?
11:59:33 <morel> i am not sure how advanced/sophiscated clckwrks is.
12:01:32 <donri> it's still early in development so perhaps not that advanced quite yet
12:02:49 <morel> donri: but it aims to be what i need, right?
12:03:14 <alpounet> morel, clckwrks is not mature, but its aims include what you want yes
12:03:26 <alpounet> i needs quite some love right now
12:03:29 <donri> morel: oh, certainly
12:03:44 <alpounet> it*
12:04:16 <morel> is there any developer of clckwrks here?
12:06:32 <alpounet> morel, stepcut is clckwrks's author
12:06:42 <morel> ah!
12:06:46 <morel> okay.
12:12:39 <alpounet> morel, if you decide to use clckwrks at this point, you may need to implement a few stuffs yourself, which could be integrated into clckwrks
12:12:45 <alpounet> and that would be great
12:13:18 <alpounet> there are a few of us leaning toward this, but this requires you to do stuffs that you wouldn't have to do with other blogging softwares
12:13:53 <morel> clckwrks scares me off. it seems so complex…
12:17:11 <morel> i actually just want a happstack-handler which can (1) render blog-posts written in a markup-language (using pandoc or so), (2) search for blog-posts, (3) filter blog-posts by categories, (4) and maybe make an RSS-feed.
12:17:38 <morel> you know, i just want a hakyll-blog with a more powerful filter-function and a search-function.
12:18:25 <morel> and clckwrks doesn't even seem to have a (real) documentation.
12:19:52 <morel> alpounet: but yes. you're right. i'll try to expand clckwrks!
12:20:07 <morel> (although the name "clckwrks" really really sucks!)
12:21:03 <alpounet> well yeah clckwrks is (and aims at being) more than just a blogging software anyway
12:21:13 <alpounet> it's also a CMS
12:21:29 <morel> yup
12:21:35 <morel> actually, i like that.
12:21:39 <morel> yea.
12:22:08 <morel> ACTION is cloning clckrckwerkclkkwlrrcklerewlthisnamereallysucks.
12:32:22 <Entroacceptor> indeed
12:32:29 <Entroacceptor> nearly as bad as my tfrtbtcb
12:44:12 <Entroacceptor> stepcut: I'd suggest adding "happstack" to the website title. Just "Home" doesn't cut it :) <title>Home - Happstack</title>
14:58:14 <stepkut> morel: clckwrks currently does 1 and 4. 2 & 3 are on the TODO list. But a high priority. Right now we are focused on the core blogging aspects of clckwrks and trying to make them a solid as possible
15:06:18 <stepcut> morel: clckwrks is under documented, but that is also a high priority
15:17:30 <morel> stepcut: i see.
15:18:22 <morel> stepcut: documentation is probably the most important since it's the gate to contribution.
15:19:02 <stepkut> morel: the first gate to contribution was making the source code available
15:19:13 <morel> yup
15:19:18 <stepkut> morel: but, documentation is a close second
15:19:48 <stepkut> what is the #1 thing you would like to see documented next?
15:20:29 <morel> erm…
15:23:02 <morel> stepkut: documentation of the internals of clckwrks would be nice.
15:23:31 <stepkut> morel: yeah, so far we just have the high level overview of how the pieces fit together, http://www.clckwrks.com/C/ViewPage/7
15:23:41 <stepkut> morel: are there some specific internals you are interested in?
15:24:32 <morel> stepkut: well. what would i need to know to be able to add a search-function/feature?
15:25:13 <stepkut> ah.. you would want to know about how pages work
15:25:36 <morel> okay, then that. :)
15:25:53 <stepkut> ok
15:26:11 <stepkut> I am moving locations, bbiab.
15:26:22 <morel> bye
15:41:55 <alpounet> stepcut, ping me when you're around
15:43:04 <morel> erm… he is away. he didn't hear you.
15:44:31 <alpounet> don't worry
15:44:37 <alpounet> it's about me contributing to clckwrks
15:45:00 <alpounet> he'll ping me at the moment he reads the channel
15:45:22 <morel> ok
15:45:47 <alpounet> there you go :p
15:46:15 <stepkut> I mean, back!
15:48:15 <morel> :)
15:49:07 <alpounet> stepkut, opened up Clckwrks/URL.hs again
15:49:15 <alpounet> so, in what way to you want me to implement prettier urls
15:51:39 <stepkut> alpounet: the choices are (1) write all the url routes by hand using boomerang (2) change derivePathInfo so that the automatically generated names are pretty enough
15:51:51 <stepkut> and related, we should add page slugs for some pages
15:52:12 <stepkut> (2) is easier, but gives less control
15:52:15 <alpounet> stepkut, one thing i don't know what to do about is hmm
15:52:25 <alpounet> for example, for ViewPage PageId
15:52:40 <alpounet> we'd most likely want to add a slug for the page title or smth
15:52:50 <alpounet> yeah well you actually mentionned it
15:53:09 <alpounet> and this isn't something we can do right from a ClckUrl
15:58:58 <stepkut> for a page slug we can do, ViewPage PageId Slug, I think
15:59:10 <stepkut> where, Slug is, newtype Slug = Slug Text
15:59:28 <stepkut> the printer would show the Text, but the parser would accept anything
16:03:28 <alpounet> stepkut, yeah sounds good
16:03:57 <alpounet> and the Blog constructor will be expanded to hold its own BlogUrl scheme i guess
16:13:02 <stepkut> no
16:13:15 <stepkut> well, maybe
16:13:40 <stepkut> right now the Blog constructor just takes you to the blog homepage.. aka, the page that shows the posts in reverse chronological order
16:14:00 <alpounet> yeah, but i guess it'll work like the Admin component
16:14:00 <stepkut> perhaps there is a more descriptive name we could use for that constructor
16:14:10 <stepkut> ?
16:14:11 <alpounet> which has its own url scheme
16:15:24 <stepkut> not sure
16:15:49 <stepkut> right now the only difference between a Page and a Post is that posts get included in the blogfeed
16:16:26 <alpounet> yeah but we can't view a blog post individually for now for example
16:17:07 <stepkut> http://www.happstack.com/C/ViewPage/12
16:17:24 <stepkut> that is a single blog post..
16:17:31 <alpounet> oh
16:17:36 <alpounet> blog posts ARE pages?
16:17:36 <stepkut> in the blog feed there is a 'permalink' link at the bottom of each post
16:17:42 <stepkut> yes
16:17:48 <alpounet> alriiiight
16:17:51 <stepkut> they share the same underlying type
16:18:22 <stepkut> the only difference is the, data PageKind = PlainPage | Post
16:18:41 <stepkut> which currently only affects if they should up in the blog feed or not
16:18:51 <alpounet> ok
16:32:47 <alpounet> stepkut, what do you want me to generate?
16:33:00 <alpounet> a RouteT ClckURL IO () ?
16:35:02 <stepkut> generate when?
16:36:19 <alpounet> with boomerang/web-routes-boomerang
16:36:56 <stepkut> all you generate is a ClckURL.. no monads required
16:39:05 <alpounet> no i mean
16:39:28 <alpounet> i'll define the grammar with boomerang
16:39:49 <alpounet> and then, what additional stuffs is needed here
16:40:50 <stepkut> nothing really.. I guess we have to switch a line in the code somewhere to use boomerang instead of PathInfo
16:40:55 <stepkut> but that should be about it
16:48:39 <stepkut> alpounet: I assume you know about this, http://www.happstack.com/docs/crashcourse/WebRoutes.html#web-routes-boomerang
16:48:48 <alpounet> yeah
16:52:13 <stepkut> donri: any reason why I should not bump the happstack-clientsession version number and upload a new version?
16:59:41 <donri> stepkut: new thing is you can get a random key and store it in acid-state. duno if that's important enough?
17:00:20 <donri> you decide!
17:06:05 <stepkut> donri: I can not think of a good reason not to make a release.. what could would holding it back do?
17:06:17 <stepkut> unless you were planning to submit another patch in the next 24 hours
17:08:05 <stepkut> the longer I don't upload it, the more likely I am to forget
17:08:11 <stepkut> until scoutess can come along and remind me
17:08:40 <stepkut> "STEPCUT! Y U NO UPLOAD HAPPSTACK-CLIENTSESSION!"
17:10:04 <donri> :)
17:10:22 <donri> only reason would be to better document the new feature, but i'm likely too lazy
17:11:43 <stepkut> you fixed a typo in this line:
17:11:44 <stepkut> +The cookie values stored in an encrypted cookie to make it more
17:12:03 <stepkut> but, unless I am mistaken, it is still missing an 'are' between values and stored?
17:12:20 <donri> true
17:12:24 <stepkut> I fixed that already
17:12:52 <stepkut> anyway, it is uploaded
17:13:29 <donri> also maybe we should rename it to "securecookie" and then build a client session on top of it... it's not really a session yet because we're not enforcing the lifetime
17:14:28 <donri> or we could just say that we "intend to add that at some point" and keep it as is for now ;)
17:59:55 <alpounet> hm
18:03:45 <alpounet> i'm almost done
18:07:02 <alpounet> only have to worry about AuthProfileURL and it should be okay
18:07:04 <alpounet> will keep you posted
18:12:42 <donri> https://plus.google.com/u/0/116553865628071717889/posts/E9yCG59HHys
18:12:44 <donri> badumdish
20:19:15 <alpounet> hey stepkut
20:19:46 <alpounet> writing web-routes-boomerang routes for AuthProfileURL is gonna painful
20:28:09 <alpounet> +be
20:31:37 <alpounet> stepkut, is there any other way than writing routes for all the AuthURL/ProfileURL stuffs?
21:08:17 <alpounet> alright, i think i'm done....
21:08:19 <alpounet> that's scary.
21:11:43 <donri> :)
21:18:40 <alpounet> oh well
21:18:42 <alpounet> ghc doesn't agree
21:34:43 <alpounet> is there a boomerang combinator for capturing Text ?
21:37:18 <alpounet> donri ? :p
21:37:29 <donri> there is in darcs
21:37:45 <donri> stepcut: y u no release
21:38:30 <alpounet> i'll change Text to String in ClckURL for the plugin constructor, for now
21:38:52 <donri> you could also use xmaph
21:39:24 <alpounet> using pack/unpack ?
21:39:28 <donri> yea
21:39:32 <alpounet> hm right
21:39:41 <alpounet> i have another problem to solve anyway, before
21:39:41 <donri> i think tazjin has a function for it
21:39:51 <stepkut> alpounet: for the happstack-authenticate related stuff we should put it in happstack-authenticate
21:40:04 <tazjin> A function for what? Boomerang & text? Yeah, I think so
21:40:04 <stepkut> though happstack-authenticate already has some stuff
21:40:08 <alpounet> stepcut, that means adding boomerang as a dependency
21:40:14 <alpounet> and web-routes-boomerang
21:40:19 <stepkut> i think anyString
21:40:40 <stepkut> i think the names in happstack-authenticate are maybe ok? I believe I wrote them by hand the hard way
21:40:46 <alpounet> tazjin, rpboably looks like: xmaph Text.pack (Just . Text.unpack) anyString
21:40:47 <alpounet> ?
21:41:01 <alpounet> probably*
21:41:13 <tazjin> Pretty sure it was basically that
21:41:24 <tazjin> I don't remember in which project I used it though and I'm eating right now, so it's hard to find ;D
21:41:29 <alpounet> yeah, i'll modify that later anyway
21:41:33 <alpounet> for now my problem is with
21:41:46 <alpounet> rViewPage . ("view-page" </> pageId . "-" . slug)
21:41:50 <alpounet> i get
21:41:59 <alpounet> Couldn't match type `()' with `Slug :- ()'
21:42:17 <alpounet> because of "view-page" apparently
21:43:03 <alpounet> stepkut, once i get everything to work i'll send you a patch for happstack-authenticate and one for clckwrks
21:43:05 <tazjin> alpounet: Found it, it was really just text = xmaph pack (Just . unpack) anyString
21:43:12 <donri> alpounet: -XOverloadedStrings? or lit "view-page"?
21:43:38 <alpounet> donri, yeah i thought about that, but i *do* have -XOverloadedStrings
21:43:49 <donri> although not sure you'd get a () type for string literals otherwise
21:43:51 <donri> yea
21:44:04 <donri> my answer to all things boomerang is "add more parenthesis"
21:44:17 <donri> especially if you have trhsx in the same module
21:44:28 <alpounet> i don't
21:44:37 <donri> even so :)
21:44:54 <alpounet> donri, i just checked the crash course
21:45:00 <donri> i've had things type check that generated the wrong routes due to fixity resolution
21:45:11 <alpounet> we can read: rUserDetail </> int . lit "-" . anyString
21:45:11 <alpounet> there
21:45:19 <alpounet> so it should work really :/
21:45:47 <alpounet> will try to remove one paren
21:45:48 <alpounet> hah
21:46:16 <alpounet> nah doesn't work
21:46:45 <donri> don't you want rPageId or somesuch
21:46:57 <donri> or is pageId a helper for that
21:47:25 <alpounet> it's an helper
21:47:31 <alpounet> which is just a xmaph actually :)
21:47:35 <donri> actually, it's quite pointless to try and help without seeing source ;P
21:47:53 <alpounet> yeah lemme paste the relevant parts
21:50:51 <hpaste> alp pasted “clckwrks / routes” at http://hpaste.org/70836
21:51:14 <alpounet> there you go
21:53:00 <hpaste> alp annotated “clckwrks / routes” with “clckwrks / routes (error)” at http://hpaste.org/70836#a70837
21:57:42 <donri> can't you use derivePrinterParsers on newtypes?
21:58:15 <alpounet> i don't know
21:58:19 <alpounet> but slug should work anyway
22:00:12 <donri> i still say "add more parens", like, rViewPage </> "view-page" </> (pageId . "-" . slug)
22:00:41 <stepkut> sweet
22:01:05 <alpounet> donri, i get the very same error :/
22:01:18 <donri> fun!
22:01:29 <alpounet> it still complains about "view-page"
22:02:21 <donri> ooooh i see it
22:02:37 <alpounet> really?
22:02:37 <donri> rViewPage . ("view-page" </> pageId . "-" . slug)  -- try that?
22:03:37 <alpounet> donri, same error
22:03:56 <donri> yea, i noticed now the crash course uses </> like that too
22:04:16 <donri> well, sort of
22:04:35 <alpounet> i think i've almost tried all the possible combinations of parens, </> and .
22:05:17 <donri> :)
22:07:04 <alpounet> stepkut, any idea?
22:08:12 <donri> "view-page" </> (rViewPage . pageId . "-" . slug)  -- how about that?
22:09:53 <alpounet> now i get
22:09:56 <alpounet> Couldn't match expected type `Slug :- r0' with actual type `()'
22:10:01 <donri> :D
22:10:15 <alpounet> Expected type: PrinterParser StringsError [String] () (PageId :- (Slug :- r0))
22:10:20 <donri> surely you have the right operators imported?
22:10:25 <donri> </>, ., <>
22:10:26 <alpounet> Actual type: Router PageId
22:10:34 <alpounet> yes, Router PageId...
22:11:02 <donri> (.) from Category?
22:11:31 <alpounet> yeah i'm using Control.Category's (.) hiding Prelude's one,
22:11:45 <donri> just checking
22:11:52 <donri> and hoping it was that simple :p
22:11:52 <alpounet> and i import Web.Routes.Boomerang
22:13:30 <alpounet> oh wait
22:14:22 <alpounet> nah.
22:14:27 <alpounet> 'cause the error now
22:14:30 <alpounet> is just on "pageId"
22:16:23 <alpounet> oooh
22:16:24 <alpounet> hmm
22:16:37 <alpounet> i've written: ps = pageId . "-" . slug
22:16:50 <alpounet> and now it says :
22:17:10 <hpaste> alp pasted “routes isues” at http://hpaste.org/70838
22:17:19 <alpounet> this.
22:17:27 <alpounet> this may help you figuring out the issue
22:20:25 <donri> "view-page" </> ((rViewPage . pageId) . "-" . slug)  -- because i have no idea how the fixities act together :p
22:22:05 <alpounet> Couldn't match expected type `Slug :- r0' with actual type `()'
22:22:17 <donri> awesome!
22:22:32 <alpounet> Expected type: PrinterParser StringsError [String] () (PageId :- (Slug :- r0))      Actual type: Router PageId
22:27:30 <donri> "view-page" . (rViewPage </> pageId . "-" . slug)  -- this is what the crash course does, and we haven't tried it yet
22:28:06 <stepkut> shouldn't it be something like, rViewPage . "view-page" </> pageId . "-" . slug
22:28:45 <stepkut> the first paste has: rViewPage </> "view-page" </> pageId . "-" . slug
22:29:11 <stepkut> but I don't think that makes sense. rViewPage is just the constructor, ViewPage.. it does not actually parse anything, so putting a after it does not really make sense
22:29:40 <donri> stepkut: in the crash course you have, rUserDetail </> int . lit "-" . anyString
22:30:09 <donri> didn't make sense to me either, thus the <donri> ooooh i see it
22:30:24 <donri> but perhaps my parenthesis screwed it up?
22:31:11 <donri> (<donri> rViewPage . ("view-page" </> pageId . "-" . slug)  -- try that?
22:31:11 <donri> <alpounet> donri, same error)
22:31:24 <alpounet> yeah but . binds tigther
22:31:27 <alpounet> so it's not the same i think
22:31:36 <donri> exactly
22:32:36 <hpaste> alp annotated “clckwrks / routes” with “clckwrks / routes (annotation)” at http://hpaste.org/70836#a70839
22:32:46 <alpounet> ^^^ with your suggestion, stepkut
22:33:02 <donri> did you try my latest
22:33:08 <alpounet> yeah donri
22:33:10 <alpounet> didn't work neither
22:33:13 <donri> "view-page" . (rViewPage </> pageId . "-" . slug) -- that one
22:33:14 <donri> OK
22:33:15 <donri> :)
22:34:07 <stepkut> ACTION is trying to get the dependencies installed to check this out
22:34:35 <alpounet> you have hmm i'd say 1hour left before i bang my head against the wall
22:36:53 <donri> the clck is ticking
22:36:59 <donri> tckng
22:38:56 <stepkut> as the type for pageId is wrong
22:40:11 <alpounet> ?
22:40:48 <stepkut> one moment
22:42:51 <alpounet> ooooooooh
22:42:56 <alpounet> type Router url = PrinterParser StringsError [String] () (url :- ())
22:43:03 <alpounet> the () comes from here
22:43:29 <alpounet> removed the type annotations for slug and pageId
22:43:40 <alpounet> now the problem is elsewhere
22:43:40 <alpounet> cool!
22:43:41 <alpounet> thanks
22:43:52 <donri> you'd think Router would work though
22:44:37 <stepkut> hold on
22:44:43 <stepkut> the type for pageId is fine
22:45:10 <stepkut> or not
22:45:16 <alpounet> it's either slug's or pageId's
22:45:22 <alpounet> that shouldn't be just Router
22:45:34 <alpounet> depends on the "direction" of the stack
22:45:47 <alpounet>     Occurs check: cannot construct the infinite type:
22:45:47 <alpounet>       b0 = OpenIdProvider :- b0
22:45:50 <stepkut> the definition for pageId is fine, but the type is too restrictive
22:45:52 <alpounet> now that's fun!
22:46:38 <stepkut> the type alias for Router should perhaps be changed
22:48:09 <alpounet> it doesn't "compose" well for multiple arg constructors, apparently
22:50:34 <stepkut> something like that
22:50:36 <alpounet> don't worry, i have a new error now
22:50:55 <stepkut> also looks like derivePrinterParser matches on _ even when there is only one constructor
22:51:37 <stepkut> or something
22:52:22 <hpaste> alp pasted “still some clckwrks/routes issues” at http://hpaste.org/70840
22:53:04 <stepkut> we don't we just reuse the routes that happstack-authenticate already provides?
22:53:52 <alpounet> stepcut, they are just PathInfo instances
22:53:58 <stepkut> so?
22:54:12 <alpounet> i haven't seen a way to stick that into web-routes-boomerang made urls
22:54:17 <alpounet> url parsing*
22:54:37 <stepkut> i guess we should make a way then
22:55:02 <stepkut> but I have to write a 300 word description of the presentation I am giving first
22:55:07 <stepkut> sorry about the delay
22:56:25 <alpounet> i don't mind doing stuffs by hand
22:56:32 <alpounet> actually most of the route code built
22:58:25 <stepkut> k
22:59:12 <alpounet> what i pasted is toward the end of my routes
23:03:37 <alpounet> this is driving me crazy
23:04:33 <stepkut> boomerang could probably use some improvements
23:04:36 <donri> i've thought before it would be nice if there was an easy way to mount a pathinfo on a boomerang
23:04:39 <stepkut> I need to actually start using it myself
23:05:16 <alpounet> how the hell can i be trying to construct an infinite type
23:05:20 <alpounet> that doesn't make any sense
23:12:56 <stepkut> alpounet: I think you just need to add some type sigs
23:13:01 <stepkut> openidProviderRoute :: PrinterParser StringsError [String] o (OpenIdProvider :- o)
23:13:05 <stepkut> authModeRoute :: PrinterParser StringsError [String] o (AuthMode :- o)
23:13:09 <stepkut> authURLRoute :: PrinterParser StringsError [String] o (AuthURL :- o)
23:14:00 <donri> :-o
23:14:14 <stepkut> donri: no, :- o
23:14:33 <donri> ;- )
23:14:39 <stepkut> heh
23:15:10 <stepkut> should probably fix the Router alias so we can make those types shorter :- /
23:15:48 <alpounet> YEAH!
23:15:50 <alpounet> it works
23:15:55 <stepkut> epic!
23:16:03 <alpounet> but boomerang definitely has some trouble with multiple arg constructors
23:16:16 <alpounet> well, it doesn't, but it's fancier to use with them :
23:16:17 <alpounet> :p
23:16:50 <donri> type a -: b = PrinterParser StringsError [String] b (a :- b)
23:16:53 <hpaste> stepcut annotated “still some clckwrks/routes issues” with “still some clckwrks/routes issues (annotation)” at http://hpaste.org/70840#a70841
23:17:02 <stepkut> now fix the layout! so it's all pretty and stuff :p
23:17:10 <donri> ok that won't work :p
23:17:24 <alpounet> No instance for (EmbedAsAttr (ClckT ClckURL (Happstack.Server.Internal.Monads.ServerPartT IO)) (Attr String (Clckwrks.URL.Slug -> ClckURL))) arising from a use of `asAttr'
23:17:30 <alpounet> whaaaaaaaaaaaaaaaaaaaat
23:17:31 <donri> type a :~ b = PrinterParser StringsError [String] b (a :- b)  -- :D
23:17:58 <stepkut> alpounet: well, you added a Slug argument to PageView, now places that call PageView need to provide something
23:18:29 <alpounet> i'll try to figure out what to do with that
23:18:34 <alpounet> the code will probably speak for itself
23:18:41 <alpounet> just wanted to share how scary the error is
23:18:59 <donri> it actually makes perfect sense when you understand it
23:19:01 <donri> but, yea :D
23:19:49 <donri> basically you have things like, <a href=(ViewPage x)/> and due to currying you end up trying to embed a function as an attribute
23:20:26 <alpounet> yeah
23:20:39 <alpounet> it's in the atom feed, so <link ... /> but yeah
23:20:53 <alpounet> so hmm
23:21:05 <alpounet> i have to generate a slug from a Page
23:21:08 <alpounet> any preference stepkut ?
23:22:04 <stepkut> i think the Page type should be extended to have a slug field
23:22:19 <donri> intercalate "-" . unwords . map toLower $ pageTitle
23:22:25 <stepkut> that way we can edit it
23:22:26 <donri> or that
23:22:31 <stepkut> by default it will be generated automatically from the title
23:22:48 <stepkut> donri: yeah
23:23:03 <donri> maybe use split package for real code
23:23:12 <donri> unwords is probably crappy at things like punctuation
23:24:23 <alpounet> stepkut, alright, i'm making slug a field of Page
23:24:38 <alpounet> what's Page_001 btw?
23:27:01 <donri> safecopy migrations?
23:27:19 <alpounet> oh yeah
23:27:24 <alpounet> probably an old format or something
23:29:10 <stepkut> alpounet: yeah, a migration. You'll need to add one as well.
23:29:51 <alpounet> stepkut, should i add a slug field to Page_001 ?
23:29:55 <alpounet> or just compute it in migrate?
23:30:07 <stepkut> no that wouldn't work
23:30:32 <alpounet> the latter?
23:30:33 <stepkut> you need to copy the existing Page type to Page_002 (renaming the constructors and field names)
23:30:57 <stepkut> then add the slug field to Page (and bump the version from 2 in 3 in deriveSafeCopy)
23:31:00 <alpounet> oooooh yeah right
23:31:25 <alpounet> tnks
23:31:30 <stepkut> then change the existing migrate instance from Page to Page_002
23:31:33 <alpounet> this is all gonna be one hell of a patch man
23:31:34 <donri> stepkut: can't you handle that with modules
23:31:39 <stepkut> and add a new migrate from Page_002 to page
23:31:56 <stepkut> donri: ?
23:32:24 <donri> like, instead of Page_001, move Page to Page/V001.hs
23:33:07 <stepkut> donri: you start ending up with circular dependencies that way
23:33:12 <stepkut> in my experience
23:33:13 <donri> type MigrateFrom Page = V001.Page
23:33:18 <donri> oh?
23:33:31 <donri> well ok then :)
23:33:34 <stepkut> yeah
23:33:37 <stepkut> something like that
23:33:47 <stepkut> it worked out less well than hoped
23:34:03 <stepkut> it would be nice to figure out how to make that work though
23:35:08 <donri> if you also have the latest version in such a module, and the modules only define Page, i don't see a problem
23:35:27 <donri> just import old versions qualified and latest unqualified in Page.hs
23:37:00 <stepkut> i would have to think really hard to remember the problem.. and I am supposed to be thinking about this abstract and bio at the moment
23:37:29 <stepkut> if you put each type in its own module that might work
23:37:39 <stepkut> though you would have a lot of modules then.. not sure how that is better
23:38:29 <stepkut> the big issues is that the Migrate instances need to import both the old and new types.. and I think that is when things get messy
23:38:57 <stepkut> so..
23:39:18 <stepkut> if you have a module that defines Bar and Page, and Page contains a Bar.. that is where you start to have trouble
23:39:18 <donri> i think it'd work my way, but yea lots of modules. i'd only restructure a type like that if i had to add a migration though
23:39:28 <donri> and since i never deploy anything \o/
23:39:54 <stepkut> if you modify Page and put the old one in Page_001, then Page_001 still needs access to Bar.
23:40:09 <stepkut> but Bar is defined in the Types module.
23:40:15 <stepkut> so Page_001 has to import that
23:40:19 <stepkut> so far, everything is ok
23:40:37 <stepkut> but then you want to create a Migrate instance, so you have to import Page_001 back into Types.. and now you have a circle
23:40:46 <stepkut> and GHC gets sad
23:41:15 <donri> sure, if you insist on a single Types module :)
23:42:05 <donri> i think i'd rather change some imports than rename all constructors and fields
23:44:00 <donri> also i'm just thinking out loud for myself, not suggesting what anyone else should do :)
23:45:50 <stepkut> I have not considered the single type-per-module approach. Seems like in some situations the number of imports you have to change could out number the number of constructors. But I think the number if imports you have to change is limited to the number of other types that depend on that type? The .Types file could then just re-export all the types
23:46:19 <donri> yea exactly
23:46:36 <donri> they only have to import each other directly
23:46:44 <stepkut> right
23:47:04 <stepkut> i have not tried this approach, but it seems like it could work
23:47:21 <donri> i'm a bit of a neat-freak though :)
23:47:24 <stepkut> rather, it seems worth trying
23:47:33 <stepkut> though, perhaps not with clckwrks as the first trial
23:48:24 <donri> i need to make it easier to add modules with vim2hs
23:48:33 <donri> it's really boring when you have to do mkdir -p and such
23:48:35 <stepkut> yeah
23:48:50 <donri> vim2hs already helps with a smart snippet for the module header
23:48:55 <donri> figures out the module name from the file name
23:49:31 <stepkut> actually.. I am not sure if you really do have to change the imports
23:49:46 <alpounet> alriiiiiiiiiiiiiight stepkut
23:49:50 <alpounet> changes to Page etc made
23:50:05 <stepkut> If Page depends on Bar and you reversion Bar.. then Page will still want to import the latest Bar..
23:50:09 <alpounet> back to Acid.hs
23:50:12 <stepkut> k
23:53:05 <donri> stepkut: well you can have a Bar module exporting the latest Bar
23:53:10 <donri> and have Types export that in turn
23:53:29 <donri> it's a bit of maintenance work but ends up clean i think
23:53:44 <stepkut> right
23:54:10 <stepkut> but Page needs to import Bar directly, not through Types
23:54:26 <donri> yes, so it imports Types.Bar (Bar)
23:54:31 <stepkut> but when you version Bar, I don't think any imports change
23:54:41 <donri> yea, not sure
23:54:46 <stepkut> well, only one does
23:54:49 <donri> i guess if you change the type variables
23:54:51 <stepkut> you copy Bar to Bar_XXX
23:55:06 <stepkut> and then you edit the Bar to import that new Bar_XXX
23:55:15 <stepkut> before it would have been importing Bar_XXX-1
23:57:37 <stepkut> brb