19:48:40 in which order should I get a database connection and run simpleHTTP? 19:49:15 should there be one connection per response, or one connection for the life of the app? 19:52:48 I would connect to the database before starting to accepting incoming requests 19:53:25 stepcut: So the change in QC dependencies now conflicts with another library. 19:53:33 but it also depends on the database.. for example, MySQL had some issues with multiple threads and overlapping queries 19:53:42 mightybyte: sweet! 19:53:53 stepcut: :( 19:54:02 mightybyte: I see no solution except to using runhaskell so that the warning is ignored, or for everyone to upgrade to QC2 19:54:38 mightybyte: at least happstack isn't holding up the train to QC2 land anymore ;) 19:55:07 what library is conflicting now? 19:55:14 In #haskell, ivanm seemed to think that it's not good to include testing libraries as package dependencies. 19:55:20 Crypto 19:55:28 (used by happstack-auth) 19:56:09 the dependencies can be made optional though 19:56:17 mightybyte: well, happstack-util provides functions to turn quickcheck tests into hunit tests... we can't not depend on QC2 and still provide that functionality 19:56:47 aavogt: How can it be made optional? 19:57:20 aavogt: that is actually not allowed. You can not have flags which change the API which is exported 19:58:40 even considering CPP here? 19:58:55 aavogt: it can be done, it is just not allowed.. 19:59:04 lol 19:59:07 depends how you have the tests organized... they could just be in separate binary 19:59:37 aavogt: but that is not the problem here. The problem is that happstack-util exports a function which turns quickchecks into hunit tests 20:00:06 aavogt: we could put that in a separate library, and put all the tests in separate libraries as well 20:00:29 you can also put those functions in a separate module 20:00:59 aavogt: they already are in separate modules.. 20:01:00 I'm 100% sure that takusen has some stuff in the .cabal file to enable modules given specific flags 20:01:11 aavogt: yes, I am 100% sure that is not allowed 20:01:48 20:01:51 http://hackage.haskell.org/packages/archive/Takusen/0.8.5/Takusen.cabal 20:02:10 If flag(blah); ExposedModules: ... 20:02:24 yes.. that is not allowed 20:02:26 or am I still missing something? 20:02:35 here is the problem 20:02:47 hackage won't accept such packages anymore? 20:03:00 how does another library depend on the version of takusen that has those modules enabled? 20:03:21 you can't 20:03:39 aavogt: so cabal install won't work then, right? 20:04:38 only if people actually use those missing modules 20:05:03 well, if no one is using them, then might as well delete them ;) 20:06:53 are people using these functions? 20:07:14 I guess they are, otherwise we wouldn't have such troubles with them... 20:09:29 there are really only two correct solutions -- we always export the test utility functions and tests in happstack-*, or we move all of those functions into separate packages 20:09:58 happstack-util-tests.cabal, happstack-data-tests.cabal, etc 20:11:34 I would accept a patch that did the latter 20:13:08 What about not exporting the test utility functions? 20:13:25 is it possible to get ghci to run trhsx? 20:14:06 mightybyte: not exporting them ever? 20:14:36 mightybyte: the tests in the other happstack-* libraries use those functions, so they have to be exported somewhere 20:14:45 aavogt: yes 20:14:53 Which functions are these? 20:15:05 aavogt: just put {-# OPTIONS -F -pgmFtrhsx -fno-warn-orphans -Wwarn #-} at the top of the .hs file 20:15:28 aavogt: you can not have it run trhsx on things you input directly at the command prompt as far as I know 20:15:54 mightybyte: happstack-util/src/Happstack/Util/Testing.hs 20:16:15 mightybyte: some of the tests in happstack-state are quickchecks -- but our testing framework is based on hunit 20:16:28 thanks stepcut 20:17:38 stepcut: Hmmm, that code doesn't depend on Happstack. Seems like it could go into HUnit or QuickCheck. 20:18:13 mightybyte: yes, most of the code in happstack-util is not happstack specific and could go somewhere else.. 20:19:08 mightybyte: that module actually come from haskell-extra, but depending on that seemed even worse :) 20:19:10 Grrrr, this is an annoying problem. 20:19:38 yes, dependencies are an endless source of annoyance 20:20:05 What to do... 20:20:16 use runhaskell Setup ;) 20:20:32 or patch Crypto ? 20:20:48 I'm looking at that. 20:21:02 or submit a patch that splits all the testing stuff out into separate packages 20:21:20 Looks like Creighton is the maintainer of Crypto. 20:21:37 yes 20:21:56 He'll probably accept a patch. 20:22:34 it would also be swell if Crypto did not depend on NewBinary.. but that is harder 21:14:46 aavogt: conditional modules in the takusen style is not really allowed 21:14:46 dcoutts: You have 2 new messages. '/msg lambdabot @messages' to read them. 21:14:54 though we don't actually prevent it 21:14:59 it breaks packaging assumptions 21:17:21 dcoutts: so now that happstack uses QC2, that means any library that you want to use with happstack that depends directly or indirectly on QC must also use QC2? 21:17:56 sadly, yes 21:18:03 ok, just checking 21:18:27 HaXml is going to be a pain in that regard 21:18:29 and in your case you actually export QC stuff, it's not just a private dependency 21:18:40 QC2 will be in the next HP release 21:18:50 nifty 21:18:56 so everyone is going to be encouraged to update anyway 21:19:12 is HaXml 1.20 going to be in the next HP release? 21:19:15 no 21:19:20 it's not been proposed 21:20:07 it should probably be proposed since 1.13 is officially dead now.. and 1.20 is stable 21:20:21 assuming any version of HaXml is in HP 21:20:47 I'd be happy to see HaXml proposed for the HP 21:21:11 though it'll be an interesting one, what with there being 3 other xml libs that also might want to try 21:22:05 DB, xml and GUI are going to be the fun ones to get into the HP 21:22:14 HaXml 1.20 is certainly a bigger challenger than 1.13 21:22:22 DB == happstack-state ;) 21:22:45 yes, it would obviously be 1.20+ and not the old 1.13 21:22:57 if any version of HaXml were to be added 21:23:11 right 21:24:10 dcoutts: cabal install sometimes fails with ghc-pkg dump failed under 6.13.. am I doing something wrong? Or just too new for cabal? 21:24:36 or maybe too new, but not new enough.. 21:25:26 stepcut: what version of cabal-install, Cabal and ghc? 21:27:00 ah, it seems my cabal-install is still at 0.6.2 using 1.6.0.3 21:27:16 but the other parts are, The Glorious Glasgow Haskell Compilation System, version 6.13 and Cabal-1.9.0 21:27:19 that can't be good :) 21:28:04 I am guessing that upgrading to 0.8.0 would help things 21:28:15 or should I get it from darcs? 21:30:22 stepcut: cabal install -w ghc-6.10.4 'cabal-install >= 0.8' 21:30:50 what does the -w ghc-6.10.4 do ? 21:31:05 use that version of ghc to do the build 21:31:18 since that version of cabal cannot use 6.12 21:31:33 ah.. guess I just won't use it for now 21:31:44 change as appropriate for whatever older version of ghc you've still got 21:32:03 the oldest I got is 6.13 :) 21:32:05 if you only have 6.12 now then you need to boostrap cabal-install again 21:32:16 map (+2) [1..10] 21:32:34 [3,4,5,6,7,8,9,10,11,12] 21:35:54 @help 21:35:55 help . Ask for help for . Try 'list' for all commands 21:36:10 @list 21:36:10 http://code.haskell.org/lambdabot/COMMANDS 21:36:18 vki: if you want lambdabot to do it, you gotta preface it with > 21:36:22 > map (+2) [1..10] 21:36:23 [3,4,5,6,7,8,9,10,11,12] 21:36:41 >map (+2) [1..10] 21:36:53 need a space after > 21:36:58 > map (+2) [1..10] 21:36:59 [3,4,5,6,7,8,9,10,11,12] 21:37:29 thanks, and how to get to @pl commands? 21:37:53 @pl \f x -> map f x 21:37:53 map 21:37:56 ? 21:38:10 ACTION is not really up on the state of the art lambdabot commands 21:39:14 > @ 21:39:15 : parse error on input `@' 21:39:34 > @pl \f x -> x*x 21:39:36 : parse error on input `@' 21:39:44 @pl \f x -> x*x 21:39:45 const (join (*)) 21:46:38 good old join 21:46:39 :)