You can subscribe to this list here.
2004 |
Jan
|
Feb
(6) |
Mar
(11) |
Apr
(5) |
May
(23) |
Jun
|
Jul
(5) |
Aug
|
Sep
(13) |
Oct
|
Nov
(10) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(1) |
Feb
(18) |
Mar
|
Apr
(5) |
May
(6) |
Jun
(2) |
Jul
(2) |
Aug
(2) |
Sep
(10) |
Oct
|
Nov
(1) |
Dec
(5) |
2006 |
Jan
(2) |
Feb
|
Mar
(11) |
Apr
|
May
|
Jun
|
Jul
(34) |
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2007 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(5) |
Oct
(3) |
Nov
(14) |
Dec
(15) |
2008 |
Jan
(13) |
Feb
(3) |
Mar
(12) |
Apr
(16) |
May
(4) |
Jun
(2) |
Jul
(26) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2009 |
Jan
|
Feb
(4) |
Mar
(13) |
Apr
(22) |
May
(25) |
Jun
(2) |
Jul
(10) |
Aug
(2) |
Sep
(41) |
Oct
(5) |
Nov
(9) |
Dec
|
2010 |
Jan
(3) |
Feb
(4) |
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
(1) |
Oct
(4) |
Nov
(8) |
Dec
|
2011 |
Jan
(2) |
Feb
|
Mar
(3) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
|
Dec
(1) |
2013 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2014 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Peter S. <si...@cr...> - 2007-09-12 19:59:34
|
Bjorn Bringert writes: > Does anyone know how to do something like darcs' motd? Or some > other way to mark a CVS repo as obsolete? Maybe it's possible to have Sourceforge disable the CVS repository? Anyway, I'd like to say that HaskellDB is great. I was sceptical at first because I thought that feeding plain text SQL queries into HSQL would be good enough, but type-safe access really is a different thing. Thanks a lot to everyone involved for providing this fine library as free software, Best regards, Peter |
From: Bjorn B. <bri...@cs...> - 2007-09-10 20:36:42
|
On Sep 10, 2007, at 21:07 , Peter Simons wrote: >> darcs get http://darcs.haskell.org/haskelldb/ > > Thanks to everyone who responded; the latest darcs version does > work fine. It might be a good idea to empty the CVS repository at > sourceforge (or otherwise mark it as obsolete). I didn't realize > that it is no longer used. > > Best regards, > Peter That sounds like a good idea. I'm reluctant to delete it, but marking =20= it as obsolete with a reference to the darcs version would be nice. =20 Does anyone know how to do something like darcs' motd? Or some other =20 way to mark a CVS repo as obsolete? /Bj=F6rn |
From: Peter S. <si...@cr...> - 2007-09-10 19:08:04
|
> darcs get http://darcs.haskell.org/haskelldb/ Thanks to everyone who responded; the latest darcs version does work fine. It might be a good idea to empty the CVS repository at sourceforge (or otherwise mark it as obsolete). I didn't realize that it is no longer used. Best regards, Peter |
From: Bjorn B. <bri...@cs...> - 2007-09-10 08:04:09
|
On Sep 9, 2007, at 2:00 , Peter Simons wrote: > Hi, > > I tried to build the current CVS head with GHC 6.6.1. To make > Cabal work, I had to change the extensions field as follows: > > --- a/haskelldb.cabal > +++ b/haskelldb.cabal > @@ -7,7 +7,7 @@ License: BSD3 > build-depends: haskell98, base > Extensions: ExistentialQuantification, > OverlappingInstances, > - AllowUndecidableInstances, > + UndecidableInstances, > MultiParamTypeClasses > Synopsis: SQL unwrapper for Haskell. > > During the build, however, I get this error: > > src/Database/HaskellDB/Database.hs:116:16: > The scoped type variables `ef' and `f' > are bound to the same type (variable) > Distinct scoped type variables must be distinct > In the pattern: _ :: Rel (RecCons ef (Expr ea) er) > In the definition of `getRec': > getRec vfs (_ :: Rel (RecCons ef (Expr ea) er)) (f : fs) stmt > =3D do x <- getValue vfs stmt f > r <- getRec vfs (undefined :: Rel er) fs stmt > return ((RecCons x) . r) > In the definition for method `getRec' > > I'm not sure how to fix that. Can anyone help me, please? You said "CVS head", if that's correct, use the darcs repo instead: darcs get http://darcs.haskell.org/haskelldb/ The currect darcs version builds with GHC 6.6, I haven't tested 6.6.1 =20= myself. /Bj=F6rn |
From: Peter S. <si...@cr...> - 2007-09-09 00:00:53
|
Hi, I tried to build the current CVS head with GHC 6.6.1. To make Cabal work, I had to change the extensions field as follows: --- a/haskelldb.cabal +++ b/haskelldb.cabal @@ -7,7 +7,7 @@ License: BSD3 build-depends: haskell98, base Extensions: ExistentialQuantification, OverlappingInstances, - AllowUndecidableInstances, + UndecidableInstances, MultiParamTypeClasses Synopsis: SQL unwrapper for Haskell. During the build, however, I get this error: src/Database/HaskellDB/Database.hs:116:16: The scoped type variables `ef' and `f' are bound to the same type (variable) Distinct scoped type variables must be distinct In the pattern: _ :: Rel (RecCons ef (Expr ea) er) In the definition of `getRec': getRec vfs (_ :: Rel (RecCons ef (Expr ea) er)) (f : fs) stmt = do x <- getValue vfs stmt f r <- getRec vfs (undefined :: Rel er) fs stmt return ((RecCons x) . r) In the definition for method `getRec' I'm not sure how to fix that. Can anyone help me, please? Peter |
From: <bri...@cs...> - 2007-08-21 13:25:27
|
Luke Plant wrote: > Hi, Hi Luke, > I am trying to use HaskellDB for a real project, and due to the amount > of broken stuff, and the lack of any recent updates to web pages and so > on, is anyone in a position to tell me the status of the project -- > like is it dead or not? I'd say that the code is generally not dead, but the homepage and documentation are. I use HaskellDB in Hope (http://hope.bringert.net/), and I at least keep the parts needed for that alive. That does not include DBDirect or the test suite. I don't have a lot of time, so it would be very welcome if anyone would like to fix the homepage and/or documentation. > Broken stuff includes: > > - test suite doesn't even compile (patch attached) > This suggests that no-one is running tests. True. Thanks for the patch, I've pushed it to the darcs repo. > - I can't get test suite or DBDirect to run at all. > I get errors like this: > > Connecting to database... > DBDirect: user error (Couldn't load > Database.HaskellDB.HDBC.PostgreSQL.driver from package > haskelldb-hdbc-postgresql-0.10) > > From the archives, it looks like this might be a problem with > hs-plugins, but I don't have the expertise to know how to diagnose or > fix this (I'm no Haskell expert, I just want a database library!). Yes, this is a hs-plugins problem. I'm not sure what the problem is, but I believe it is some change of functionality in current hs-plugins versions. Again, help is welcome. > Out of date information includes: > > * http://haskelldb.sourceforge.net/getting-started.html -- pretty out of > date compared to version in darcs > > * Good sources of information are supposedly: > http://www.scannedinavian.org/AvianWiki/HaskellDbTutorial > http://www.haskell.org/hawiki/HaskellDbTutorial > > but both of these 404. The old 'hawiki' wiki disappeared a month or so > ago, I don't know why. I think those were pretty out of date as well by the time they disappeared. /Björn |
From: Shae M. E. <sh...@Sc...> - 2007-08-20 21:21:22
|
Luke Plant <L.P...@ca...> writes: > * http://haskelldb.sourceforge.net/getting-started.html -- pretty out of= =20 > date compared to version in darcs > > * Good sources of information are supposedly: > http://www.scannedinavian.org/AvianWiki/HaskellDbTutorial I looked on my old drive, but I couldn't find a copy of this. Lemmih had updated it most recently, he might have something. > http://www.haskell.org/hawiki/HaskellDbTutorial This was just a version of the previous url. > but both of these 404. The old 'hawiki' wiki disappeared a month or so=20 > ago, I don't know why. The old hawiki had some misleading information, but had been made immutable= ,=20 so it was best to get rid of it. =2D-=20 Programming is the Magic Executable Fridge Poetry, | www.ScannedInAvian.com It is machines made of thought, fueled by ideas. | -- Shae Matijs Erisson |
From: Luke P. <L.P...@ca...> - 2007-08-20 15:34:44
|
Hi, I am trying to use HaskellDB for a real project, and due to the amount=20 of broken stuff, and the lack of any recent updates to web pages and so=20 on, is anyone in a position to tell me the status of the project --=20 like is it dead or not? Broken stuff includes: =2D test suite doesn't even compile (patch attached) This suggests that no-one is running tests. =2D I can't get test suite or DBDirect to run at all. I get errors like this: Connecting to database... DBDirect: user error (Couldn't load=20 Database.HaskellDB.HDBC.PostgreSQL.driver from package=20 haskelldb-hdbc-postgresql-0.10) =46rom the archives, it looks like this might be a problem with=20 hs-plugins, but I don't have the expertise to know how to diagnose or=20 fix this (I'm no Haskell expert, I just want a database library!). Out of date information includes: * http://haskelldb.sourceforge.net/getting-started.html -- pretty out of=20 date compared to version in darcs * Good sources of information are supposedly: http://www.scannedinavian.org/AvianWiki/HaskellDbTutorial http://www.haskell.org/hawiki/HaskellDbTutorial but both of these 404. The old 'hawiki' wiki disappeared a month or so=20 ago, I don't know why. Thanks for your time, Luke =2D-=20 "If we could just get everyone to close their eyes and visualise world peace for an hour, imagine how serene and quiet it would be until the looting started" -- Anon Luke Plant || http://lukeplant.me.uk/ |
From: Lepinsy M. <Lep...@an...> - 2007-04-30 17:04:45
|
I don't think its the drivers, because I can get a full list of table in VB. |
From: <bri...@cs...> - 2007-03-23 17:21:18
|
Henning Thielemann wrote: > Is there some routine with signature > String -> SqlSelect > for converting an SQL query into the SqlSelect structure? No. But you are very welcome to write one! It sounds like a fun project. /Björn |
From: Henning T. <le...@he...> - 2007-03-23 17:05:21
|
Is there some routine with signature String -> SqlSelect for converting an SQL query into the SqlSelect structure? |
From: Bjorn B. <bri...@cs...> - 2007-01-24 22:25:19
|
On Jan 24, 2007, at 22:50 , Marco T=FAlio Gontijo e Silva wrote: > Hello, > > I'm using haskelldb with postgresql and I'd like to use savepoints. I > couldn't find a way to use it or to hack sql to do it by hand. > > Is it possible? > > I'm sending this question here because I want to be sure before > migrating to HDBC. Hi Marco, There is no support for savepoints in the current HaskellDB. It would =20= be interesting to add it, with some nice API. It should probably =20 generate the savepoint name automatically, and return some handle =20 that can be passed to rollbackTo. Patches are welcome! /Bj=F6rn= |
From: Marco G. e S. <mal...@ri...> - 2007-01-24 21:49:28
|
Hello, I'm using haskelldb with postgresql and I'd like to use savepoints. I couldn't find a way to use it or to hack sql to do it by hand. Is it possible? I'm sending this question here because I want to be sure before migrating to HDBC. Thanks. --=20 malebria Marco T=C3=BAlio Gontijo e Silva Correio (MSN): mal...@ri... Jabber (GTalk): mal...@ja... Ekiga: mal...@ek... IRC: mal...@ir... mal...@ir... Skype: marcotmarcot Telefone: 33346720 Celular: 98116720 Endere=C3=A7o: Rua Paula C=C3=A2ndido, 257/201 Gutierrez 30430-260 Belo Horizonte/MG Brasil |
From: <bri...@cs...> - 2007-01-18 15:51:12
|
Kelly Norton wrote: > Hi folks, >=20 > I haven't had very much luck building haskelldb on an intel mac. The=20 > error that finally put an end to forward progress is copied below. I am= =20 > running ghc-6.6 and ./configure seemed to like my setup (although I did= =20 > have to run ./configure --build i386-apple-macosx8.8.0, since=20 > config.guess couldn't make out my mac). The summary given by ./configur= e=20 > was: >=20 >=20 > HaskellDB will support: > ----------------------- >=20 > GHC: yes > HSQL: yes > ODBC: no > MySql: yes > SQLite: no > PostgreSQL: no > WxHaskell: no > Hugs: no > HSQL: no > ODBC: no > MySql: no > SQLite: no > PostgreSQL: no > WxHaskell: no >=20 > The actual error emitted during make. >=20 > /usr/local/bin/ghc -fglasgow-exts -fallow-overlapping-instances -packag= e=20 > hsql -i../build/ghc -package-name haskelldb -c=20 > ../build/ghc/Database/HaskellDB/HDBRec.hs >=20 > ../build/ghc/Database/HaskellDB/HDBRec.hs:90:0: > Illegal instance declaration for `RecCat (RecCons f a r1) > r2 > (RecCons f a r3)' > (the Coverage Condition fails for one of the functional=20 > dependencies) > In the instance declaration for `RecCat (RecCons f a r1) r2 (RecCon= s=20 > f a r3)' >=20 > ../build/ghc/Database/HaskellDB/HDBRec.hs:93:0: > Illegal instance declaration for `RecCat (Record r1) > (Record r2) > (Record r3)' > (the Coverage Condition fails for one of the functional=20 > dependencies) > In the instance declaration for `RecCat (Record r1) (Record r2)=20 > (Record r3)' > make[2]: *** [../build/ghc/Database/HaskellDB/HDBRec.o] Error 1 > make[1]: *** [all-ghc] Error 2 > make: *** [src] Error 2 >=20 >=20 > If anyone has any thoughts, I would greatly appreciate the help. > /kel This seems to be the release version of HaskellDB, which is quite=20 outdated. The current darcs version should build with 6.6 and not have=20 problems with Intel Macs. You can get it with: darcs get --partial http://darcs.haskell.org/haskelldb/ /Bj=F6rn |
From: Kelly N. <ni...@ke...> - 2007-01-16 01:30:15
|
Hi folks, I haven't had very much luck building haskelldb on an intel mac. The error that finally put an end to forward progress is copied below. I am running ghc-6.6 and ./configure seemed to like my setup (although I did have to run ./configure --build i386-apple-macosx8.8.0, since config.guess couldn't make out my mac). The summary given by ./configure was: HaskellDB will support: ----------------------- GHC: yes HSQL: yes ODBC: no MySql: yes SQLite: no PostgreSQL: no WxHaskell: no Hugs: no HSQL: no ODBC: no MySql: no SQLite: no PostgreSQL: no WxHaskell: no The actual error emitted during make. /usr/local/bin/ghc -fglasgow-exts -fallow-overlapping-instances -package hsql -i../build/ghc -package-name haskelldb -c ../build/ghc/Database/HaskellDB/HDBRec.hs ../build/ghc/Database/HaskellDB/HDBRec.hs:90:0: Illegal instance declaration for `RecCat (RecCons f a r1) r2 (RecCons f a r3)' (the Coverage Condition fails for one of the functional dependencies) In the instance declaration for `RecCat (RecCons f a r1) r2 (RecCons f a r3)' ../build/ghc/Database/HaskellDB/HDBRec.hs:93:0: Illegal instance declaration for `RecCat (Record r1) (Record r2) (Record r3)' (the Coverage Condition fails for one of the functional dependencies) In the instance declaration for `RecCat (Record r1) (Record r2) (Record r3)' make[2]: *** [../build/ghc/Database/HaskellDB/HDBRec.o] Error 1 make[1]: *** [all-ghc] Error 2 make: *** [src] Error 2 If anyone has any thoughts, I would greatly appreciate the help. /kel |
From: Matthew S. <ma...@we...> - 2006-10-01 19:57:56
|
Hi, I've been using the hdbc-postgresql driver, and there are problems with pulling timestamp values out of the database as they arrive as strings and then get interpreted as ints which causes errors. So, attached is a darcs patch which solves this problem. It adds a dependancy on parsedate, from http://www.cs.chalmers.se/~bringert/darcs/parsedate/doc/api/System-Time-Parse.html I'm not convinced my changes are in the right place - being in Types.hs makes it common to all the HDBC drivers. Plus the format string is going to vary between databases and installations, versions and configurations of PostgreSQL. On the other hand, it does at least work for me! Any comments gratefully received. The patch should apply in the hdbc directory. Matthew -- Matthew Sackman BOFH excuse #343: The ATM board has run out of 10 pound notes. We are having a whip round to refill it, care to contribute ? |
From: Marc W. <mar...@gm...> - 2006-08-17 02:06:42
|
Hi. I've noticed that this piece of code doesn't create a nullable field finished_date. Why? [...] --con :: (D.Database -> IO a) -> IO a con = mysqlConnect ( MySQLOptions {server="localhost", db=dbName, uid="sadmin", pwd=""}) createDatabase :: IO () createDatabase= do con $ \a -> dbSpecToDatabase a dbinfo where tblTodoItems= [ CInfo {cname="ID", descr = (IntT, True)} , CInfo {cname="ID2", descr = (IntT, True)} , CInfo {cname="finished_date", descr = (CalendarTimeT, True)} -- !!!! <<<<<<<<<<<<<<<<<<<<<< here ] tblTodoAssoc = TInfo { tname="todos", cols=tblTodoItems } testopts = DBOptions {useBString = False} dbinfo::DBInfo dbinfo = DBInfo {dbname = "todos" , opts = testopts, tbls = [tblTodoAssoc] } ------------------ Another question. Is con $ \db -> insert db todos ( (iD << (constant id)) # (iD2 << (constant Nothing)) # (finished_date << (constant Nothing)) ) the way to insert a new record? ( In hope it's used this way so I think yes.. ) Then let me ask the question wether it would be possible to create a function like insertValues3 a b c = ( iD << a # iD2 << b # finished_date << c) to use the insert query like this: con $ \db -> insert db todosu( insertValues3 (constant id) (constant Nothing) (constant Nothing) ) because order and types are defined by the table description so there is no need to repeat "iD <<", "iD2 <<" and "finished_date <<" again, right ? Sincerely Marc Weber |
From: Marc W. <mar...@gm...> - 2006-08-11 11:05:35
|
I tracked it down. The problem was that I couldn't use the same con type for two different tables.. All the time I was only thinking about the return value.. which was IO () in either case The trick was to pass another con value for eaach table ;) Marc |
From: Marc W. <mar...@gm...> - 2006-08-09 08:02:56
|
I had/have some problems with types of haskelldb so I tried to add type annotations. I've used Select query mainly yet. Thus my code looks like this: con = mysqlConnect <params> doSomethinng con = con $ \db -> query db $ table <table> Then I wanted to add type annotations. Thus I took the type of mysqlConnect :: MonadIO m => MySQLOptions -> (Database -> m a) -> m a and removed the connection settings yielding mysqlConnect :: MonadIO m => (Database -> m a) -> m a which is very much to type/reead IMHO. That's why I proposed introducnig: newtype CConnection :: MonadIO m => (Database -> m a) -> m a I'm struggling here now: line 39 is equal to 56 line 39 works fine line 56 doesn't. Why? Isn't both a IO monad (because of the print statements) After commenting out 56 it compiles. module Modules.ObjectTree where import Debug.Trace import Data.FunctorM import DBUtils import qualified DB.VT.Ezcontentobject_tree as EOT import qualified DB.VT.Ezcontentobject as CO import Database.HaskellDB.HDBRec import Database.HaskellDB import Database.HaskellDB.Query as Q import Data.Tree import Monad import Control.Monad.Trans import Maybe import qualified List instance FunctorM Tree where fmapM f (Node a forest) = do a' <- f a forest' <- mapM (fmapM f) forest return $ Node a' forest' type ObjectTree a = Tree (Record a) truncTree 1 (Node a _) = Node a [] truncTree x (Node a forest) = Node a $ map (truncTree (x-1)) forest oT con = do print "blah" -- because of this we should have a simple IO Monad ? lookupField con (CO.name) (CO.ezcontentobject) (CO.xid) (constant (1 :: Int)) >>= print :: IO () -- <<<<<<<<<<<<<<<<<<<<<<<<< 39 return "blah" -- printObjectsAsTree :: MonadIO m => ((Database -> m a) -> m a) -> Int -> IO () printObjectsAsTree con startid= do --<<<<<<<<<<<<<<<< 4 print "test" root <- liftM head $ lRS (EOT.parent_node_id) (constant (startid :: Int)) print root --showRS root >>= putStrLn node <- po root node_show <- fmapM showRS node return $ drawTree node_show -- return "end" where lRS = lookupFieldRS con (EOT.ezcontentobject_tree) po root = let root_id = (root!(EOT.node_id) :: Int) in do print "dumm" -- IO Monad too ? print (root!(EOT.node_id)) lookupField con (CO.name) (CO.ezcontentobject) (CO.xid) (constant (1 :: Int)) >>= print -- <<<<<<<<<<<<<< 56 return $ Node root [] --childs <- lRS (EOT.parent_node_id) (constant root_id) --mapM_ (\r -> r!(EOT.node_id)) childs >>= print showRS r = do -- name <- lookupField con (CO.name) (CO.ezcontentobject) (CO.xid) (constant 1) >>= print return "ab" :: IO String --return $ (show $ r!node_id) ++ " (" ++ (fromJust name) ++ " )" ----------------------------------------------- || Preprocessing executables for dbez-0.0... || Building dbez-0.0... || Chasing modules from: db_ez.hs || [1 of 6] Skipping DBUtils ( DBUtils.hs, dist/build/db_ez/db_ez-tmp/DBUtils.o ) || [2 of 6] Skipping DB.VT.Ezcontentobject_tree ( DB/VT/Ezcontentobject_tree.hs, dist/build/db_ez/db_ez-tmp/DB/VT/Ezcontentobject_tree.o ) || [3 of 6] Skipping DB.VT.Ezcontentobject ( DB/VT/Ezcontentobject.hs, dist/build/db_ez/db_ez-tmp/DB/VT/Ezcontentobject.o ) || [4 of 6] Compiling Modules.ObjectTree ( Modules/ObjectTree.hs, dist/build/db_ez/db_ez-tmp/Modules/ObjectTree.o ) || Modules/ObjectTree.hs|43| 0: || Couldn't match `DB.VT.Ezcontentobject_tree.Contentobject_id' || against `DB.VT.Ezcontentobject.Contentclass_id' || Expected type: RecCons DB.VT.Ezcontentobject_tree.Contentobject_id || (Maybe Int) || vr || Inferred type: RecCons DB.VT.Ezcontentobject.Contentclass_id || Int || vr1 || When using functional dependencies to combine || Database.HaskellDB.Database.GetRec (RecCons f (Expr a) er) || (RecCons f a vr), || arising from the instance declaration at Imported from Database.HaskellDB.Database || Database.HaskellDB.Database.GetRec (RecCons DB.VT.Ezcontentobject_tree.Contentobject_id || (Expr (Maybe Int)) [...] || (RecCons DB.VT.Ezcontentobject_tree.Sort_order || (Expr (Maybe Int)) || RecNil)))))))))))))))) || (RecCons DB.VT.Ezcontentobject.Contentclass_id Int vr), arising from use of `lookupFieldRS' at Modules/ObjectTree.hs|52| 14-26 || When generalising the type(s) for `printObjectsAsTree' _______________________________________________ Haskell-Cafe mailing list Has...@ha... http://www.haskell.org/mailman/listinfo/haskell-cafe |
From: Bjorn B. <bri...@cs...> - 2006-08-06 16:31:08
|
On Aug 6, 2006, at 5:15 PM, Marc Weber wrote: > eg mysqlConnect is of type: > mysqlConnect :: MonadIO m =3D> MySQLOptions -> (Database -> m a) -> m = a > > Typical usage looks like this, doesn't it? > > > doSomething :: MonadIO m =3D> (Database -> m a) -> m a -> IO () = -- << > main=3Ddo > con <- mysqlConnect Options > doSomething con .. > > Wouln't it be mucht clearer to use another typedef to write =20 > something like this ? > > > newtype CConnection :: MonadIO m =3D> (Database -> m a) -> m a > doSomething :: CConnection -> IO () -- << much shorter and = clearer > main=3Ddo > con <- mysqlConnect Options > doSomething con .. > > The first C migt indicate that it's a "connected" connection =20 > (parameters have already been applied).. > Or does this already exist? > > I'd like to provide a patch if you consider it useful > > Greetings > Marc Weber Hi Marc, I'm not sure that I completely understand your example. I think that =20 there is something wrong with the types. Here's how I think a typical application looks with the current types: options :: MysqlOptions options =3D ... doSomething :: Database -> IO () doSomething db =3D ... main :: IO () main =3D mysqlConnect options doSomething I probably misunderstood what you want to do though. /Bj=F6rn |
From: Marc W. <mar...@gm...> - 2006-08-06 13:16:05
|
eg mysqlConnect is of type: mysqlConnect :: MonadIO m => MySQLOptions -> (Database -> m a) -> m a Typical usage looks like this, doesn't it? doSomething :: MonadIO m => (Database -> m a) -> m a -> IO () -- << main=do con <- mysqlConnect Options doSomething con .. Wouln't it be mucht clearer to use another typedef to write something like this ? newtype CConnection :: MonadIO m => (Database -> m a) -> m a doSomething :: CConnection -> IO () -- << much shorter and clearer main=do con <- mysqlConnect Options doSomething con .. The first C migt indicate that it's a "connected" connection (parameters have already been applied).. Or does this already exist? I'd like to provide a patch if you consider it useful Greetings Marc Weber |
From: Bjorn B. <bri...@cs...> - 2006-07-29 23:13:42
|
On Jul 28, 2006, at 2:26 PM, Marc Weber wrote: > I've tried understanding what the BoundedList.hs module is all =20 > about but > I couldn' get it completely > > -- This inductive approach gives the complexity O(n) on the number =20 > of instances > -- and very short type checking times compared to an O(n\^2) =20 > implementation. > > Where is the difference between [a] and (BoundedList a Nxx)? > Is it only used for BoundedString by now? > (to prevent data loss when copying from char(10) to char(4)? Yes, BoundedList is only used for BoundedString in HaskellDB. The =20 purpose of BoundedString is, as you guessed, to avoid string =20 truncation. For more information, see our Haskell Workshop paper, =20 http://haskelldb.sourceforge.net/haskelldb.pdf > Did I get it right that the internal representation is still an =20 > ordinary > list ? (newtype BoundedList a n =3D BoundedList [a])? Yes. BoundedList uses a phantom type to keep the string max length in =20= the type of the list. The internal representation is a normal list. > Looking at > > instance (Show a, Size n) =3D> Show (BoundedList a n) where > show l@(L xs) =3D show xs > > l@ is superfluous, isn't it? Yes. There are probably lots of unused bindings in the HaskellDB =20 code. I guess we should compile with -Wall and fix all the warnings. /Bj=F6rn |
From: Bjorn B. <bri...@cs...> - 2006-07-29 23:13:41
|
On Jul 28, 2006, at 11:45 AM, Daniel Larsson wrote: > I started looking at HaskellDB recently, and it's quite =20 > interesting. One > thing I would like to do, which I can't find any support for, is outer > joins. Is this something that is planned to support, or have I missed > something? You are perfectly right that outer join support is missing. It's the =20 query language feature that I miss the most, and I would like to =20 implement it. The problem is that it seems a bit difficult to figure =20 out how to do it in the current version of HaskellDB, since with an =20 outer join, the fields form the second table can be NULL, even if =20 they are not nullable. This is one of the reasons why I believe that =20 HaskellDB could benefit from moving to a non-monadic query language =20 closer to that of CoddFish [1]. /Bj=F6rn [1] http://lmf.di.uminho.pt/wiki/bin/view/PURe/CoddFish |
From: Marc W. <mar...@gm...> - 2006-07-28 21:26:36
|
I've tried understanding what the BoundedList.hs module is all about but I couldn' get it completely -- This inductive approach gives the complexity O(n) on the number of instances -- and very short type checking times compared to an O(n\^2) implementation. Where is the difference between [a] and (BoundedList a Nxx)? Is it only used for BoundedString by now? (to prevent data loss when copying from char(10) to char(4)? Did I get it right that the internal representation is still an ordinary list ? (newtype BoundedList a n = BoundedList [a])? Looking at instance (Show a, Size n) => Show (BoundedList a n) where show l@(L xs) = show xs l@ is superfluous, isn't it? Marc |
From: Daniel L. <dan...@se...> - 2006-07-28 18:46:16
|
I started looking at HaskellDB recently, and it's quite interesting. One thing I would like to do, which I can't find any support for, is outer joins. Is this something that is planned to support, or have I missed something? |