[Haskell-cafe] Re: recommendation for (best) sqlite3 bindings

2010-07-21 Thread Gour
On Wed, 21 Jul 2010 08:06:49 +0300 Michael == Michael Snoyman mich...@snoyman.com wrote: Michael For the sqlite backend for persistent, I took direct-sqlite Michael and modified it slightly. I have a long history of using the Michael sqlite3 C API, so the API felt very familiar to me. So, it

Re: [Haskell-cafe] Re: recommendation for (best) sqlite3 bindings

2010-07-21 Thread Michael Snoyman
On Wed, Jul 21, 2010 at 8:59 AM, Gour g...@gour-nitai.com wrote: On Wed, 21 Jul 2010 08:06:49 +0300 Michael == Michael Snoyman mich...@snoyman.com wrote: Michael For the sqlite backend for persistent, I took direct-sqlite Michael and modified it slightly. I have a long history of using the

[Haskell-cafe] Re: src/Text/XML/HaXml/Lex.hs:(156, 0)-(160, 22): Non-exhaustive patterns in function white

2010-07-21 Thread Gracjan Polak
Antoine Latter aslatter at gmail.com writes: Sending off to the maintainer of haxr, although it looks like it might be in HaXml (from an outside guess). Without some real example to look at it will be quite tough to proceed. Alexander, can you send that stream of packets to me? -- Gracjan

[Haskell-cafe] The where-clause and guards

2010-07-21 Thread Eitan Goldshtrom
I'm trying to fit a where clause to some guards I'm using. I have the following f a b | c 1 = ... | c 1 = ... | otherwise = ... where c = a+b yet I'm getting a parsing error. Is this not the correct way to combine where with guards? -Eitan

Re: [Haskell-cafe] The where-clause and guards

2010-07-21 Thread Nicolas Wu
There's nothing wrong with the use of your example, I'm guessing it's something in your ... that's leading to the parse error. This compiles just fine: f a b | c 1 = 1 | c 1 = 2 | otherwise = 3 where c = a+b Nick On Wed, Jul 21, 2010 at 8:01 AM, Eitan Goldshtrom

Re: [Haskell-cafe] The where-clause and guards

2010-07-21 Thread Eitan Goldshtrom
Well, perhaps you can help me figure out the problem with my exact program. Just in case it matters, the program draws a Mandelbox via volumetric ray casting. I can provide more information about the function, but I wouldn't think it's necessary, since my problem is with parsing. The error I'm

Re: [Haskell-cafe] Re: Tiger compiler in Haskell: annotating abstract

2010-07-21 Thread oleg
Jose Pedro Magalhaes wrote: From what I understand, you are using a list of integers to encode a path to a subterm. This is a practical and lightweight implementation, but less type-safe: it is easy to encode annotations that do not correspond to any value. Also, it cannot guarantee, with

[Haskell-cafe] Re: gd on Win32

2010-07-21 Thread Kevin Jardine
Is there an easy way to install this module on Windows? I just ran cabal install gd and got the rather intimidating response: Missing C libraries: gd, png, z, jpeg, fontconfig, freetype, expat I actually have some of these libraries installed (eg. expat) but not most. I'm using MinGW.

Re: [Haskell-cafe] The where-clause and guards

2010-07-21 Thread Nicolas Wu
As I understand the use of where clauses in [1], A where clause is only allowed at the top level of a set of equations or case expression, would mean that the first where is scoping over the whole traceRay function: the where m = shouldn't be there, since there's already a where clause in scope.

Re: [Haskell-cafe] The where-clause and guards

2010-07-21 Thread Nicolas Wu
Ugh, my formatting got eaten up by gmail. I just removed the where in front of m =, and aligned tat statment with your ballFold definition. I would also align the first where statement with the case bars of traceRay. Nick On Wed, Jul 21, 2010 at 8:53 AM, Nicolas Wu nicolas...@gmail.com wrote:

Re: [Haskell-cafe] Re: Tiger compiler in Haskell: annotating abstract

2010-07-21 Thread José Pedro Magalhães
Hi Oleg, On Wed, Jul 21, 2010 at 09:36, o...@okmij.org wrote: Jose Pedro Magalhaes wrote: From what I understand, you are using a list of integers to encode a path to a subterm. This is a practical and lightweight implementation, but less type-safe: it is easy to encode annotations that

Re: [Haskell-cafe] src/Text/XML/HaXml/Lex.hs:(156, 0)-(160, 22): Non-exhaustive patterns in function white

2010-07-21 Thread malcolm.wallace
Judging solely by the error message (non-exhaustive patterns in 'white'), it sounds like it could be a bug in HaXml that was fixed in a patch of April 2009. Try using a more recent release of HaXml.Regards, Malcolm ___ Haskell-Cafe mailing list

[Haskell-cafe] Data types a la carte

2010-07-21 Thread Victor Nazarov
I've been experimenting with type level programming and open recursion. My aim this far is to implement very modular interpreter for lambda calculi and combinatory logic powerful enough to demonstrate steps of some term's reduction to normal form. I'd like to be able to setup the set of

[Haskell-cafe] Re: src/Text/XML/HaXml/Lex.hs:(156, 0)-(160, 22): Non-exhaustive patterns in function white

2010-07-21 Thread Alexander Kotelnikov
On Wed, 21 Jul 2010 06:46:26 + (UTC) GP == Gracjan Polak gracjanpo...@gmail.com wrote: GP GP Antoine Latter aslatter at gmail.com writes: Sending off to the maintainer of haxr, although it looks like it might be in HaXml (from an outside guess). GP GP Without some real example to look at

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-21 Thread Magnus Therning
On Wed, Jul 21, 2010 at 04:53, Rogan Creswick cresw...@gmail.com wrote: On Tue, Jul 20, 2010 at 8:50 PM, Tom Hawkins tomahawk...@gmail.com wrote: Thanks.  I tried this, but it appears cabal-install ignores the Setup.hs file.  The only way I could get it to take is if I run 'runhaskell

[Haskell-cafe] Re: src/Text/XML/HaXml/Lex.hs:(156, 0)-(160, 22): Non-exhaustive patterns in function white

2010-07-21 Thread Alexander Kotelnikov
On Wed, 21 Jul 2010 01:40:08 -0700 (PDT) mw == malcolm wallace malcolm.wall...@me.com wrote: mw mw Judging solely by the error message (non-exhaustive patterns in mw 'white'), it sounds like it could be a bug in HaXml that was fixed mw in a patch of April 2009.  Try using a more recent release

[Haskell-cafe] List manager and duplicate copies of messsages

2010-07-21 Thread José Romildo Malaquias
Hello. I have noticed that I do not receive duplicate copies of messages from haskell-cafe, although Avoid duplicate copies of messages? is set to No in the mailing list membership configuration. I want the copies because I archive all the mailing list messages with procmail based on the

Re: [Haskell-cafe] Merge hsql and HDBC -- there can only be one!

2010-07-21 Thread John Goerzen
On 07/20/2010 11:45 PM, Michael Snoyman wrote: I think a simple statement along the lines of the GNU Classpath linking exception would go very far[1]. I only mention that one since it's quoted verbatim on the Wikipedia site. Michael [1]

Re: [Haskell-cafe] Merge hsql and HDBC -- there can only be one!

2010-07-21 Thread Ketil Malde
John Goerzen jgoer...@complete.org writes: I need to read the LGPL and analyze it closer, but my first analysis suggests that this would work fine for me and others. I'm using the LGPL for library code, and GPL for applications. Although a lot of noise is generated from the linking issues,

Re: [Haskell-cafe] Merge hsql and HDBC -- there can only be one!

2010-07-21 Thread Vo Minh Thu
2010/7/21 Ketil Malde ke...@malde.org: John Goerzen jgoer...@complete.org writes: I need to read the LGPL and analyze it closer, but my first analysis suggests that this would work fine for me and others. I'm using the LGPL for library code, and GPL for applications.  Although a lot of

Re: [Haskell-cafe] List manager and duplicate copies of messsages

2010-07-21 Thread Martijn van Steenbergen
On 7/21/10 12:48, José Romildo Malaquias wrote: Hello. I have noticed that I do not receive duplicate copies of messages from haskell-cafe, although Avoid duplicate copies of messages? is set to No in the mailing list membership configuration. I want the copies because I archive all the

Re: [Haskell-cafe] src/Text/XML/HaXml/Lex.hs:(156, 0)-(160, 22): Non-exhaustive patterns in function white

2010-07-21 Thread malcolm.wallace
Ouch... I check the version and realized that Debian/unstable has version 1.13 of haxml. Malcolm, can you comment this Debian changelog entry with which Debian package was downgraded from 1.19 to 1.13:I know nothing about Debian packaging, but it sounds like there are other packages that depend

[Haskell-cafe] Haddock question

2010-07-21 Thread S. Doaitse Swierstra
I am trying to document my parser library. In order to do so I should like to include some example output in my haddock documentation. I fail to see however how to get a block of output into the haddock part. E.g. -- | We can now run the parser @`pa`@ on input \a\, which succeeds: -- @

[Haskell-cafe] Haddock question

2010-07-21 Thread S. Doaitse Swierstra
I am trying to document my parser library. In order to do so I should like to include some example output in my haddock documentation. I fail to see however how to get a block of output into the haddock part. E.g. -- | We can now run the parser @`pa`@ on input \a\, which succeeds: -- @

Re: [Haskell-cafe] Merge hsql and HDBC -- there can only be one!

2010-07-21 Thread Ketil Malde
Vo Minh Thu not...@gmail.com writes: For a LGPL library, why do you make the distinction between open source and proprietary applications? They can all link to a LGPL library. The problem with the LGPL is that in order to distribute a program using an LGPL library, the recipient must be

Re: [Haskell-cafe] Haddock question

2010-07-21 Thread Daniel Fischer
On Wednesday 21 July 2010 16:09:37, S. Doaitse Swierstra wrote: I am trying to document my parser library. In order to do so I should like to include some example output in my haddock documentation. I fail to see however how to get a block of output into the haddock part. E.g. -- | We can

Re: [Haskell-cafe] Tiger compiler in Haskell: annotating abstract syntax tree

2010-07-21 Thread S. Doaitse Swierstra
Despite the interesting discussing which has followed this question I think that in orde to approach this specific problem the use of a specific compiler-writers toolset such as the uuagc (http://hackage.haskell.org/package/uuagc-0.9.29)) system is to be preferred; it provides aneffiicent and

Re: [Haskell-cafe] Haddock question

2010-07-21 Thread S. Doaitse Swierstra
Unfortunately I get for input: -- | We can now run the parser @`pa`@ on input \a\, which succeeds: -- @ -- Result: \a\ -- Second line -- @ the output We can now run the parser pa on input a, which succeeds: Result: a Second line Doaitse On 21 jul 2010, at 16:17, Daniel Fischer

Re: [Haskell-cafe] Haddock question

2010-07-21 Thread Daniel Fischer
On Wednesday 21 July 2010 16:23:48, S. Doaitse Swierstra wrote: Unfortunately I get for input: -- | We can now run the parser @`pa`@ on input \a\, which succeeds: -- @ -- Result: \a\ -- Second line -- @ the output You need to separate the @'d paragraph from the rest of the comment by

Re: [Haskell-cafe] Haddock question

2010-07-21 Thread Ivan Lazar Miljenovic
S. Doaitse Swierstra doai...@cs.uu.nl writes: Unfortunately I get for input: -- | We can now run the parser @`pa`@ on input \a\, which succeeds: -- @ -- Result: \a\ -- Second line -- @ the output We can now run the parser pa on input a, which succeeds: Result: a Second line

[Haskell-cafe] Re: src/Text/XML/HaXml/Lex.hs:(156, 0)-(160, 22): Non-exhaustive patterns in function white

2010-07-21 Thread Alexander Kotelnikov
So updated to HaXml 1.20, haxr 3000.7 Simple calls (which deal with simple data types as integer or regular string) still work. Calls which successfully returned some binary data before do not do so anymore. The error is: Prelude.chr: bad argument: 1177427 Calls which complained about 'white'

Re: [Haskell-cafe] List manager and duplicate copies of messsages

2010-07-21 Thread José Romildo Malaquias
On Wed, Jul 21, 2010 at 02:42:37PM +0200, Martijn van Steenbergen wrote: On 7/21/10 12:48, José Romildo Malaquias wrote: Hello. I have noticed that I do not receive duplicate copies of messages from haskell-cafe, although Avoid duplicate copies of messages? is set to No in the mailing

[Haskell-cafe] Test. Ignore.

2010-07-21 Thread José Romildo Malaquias
Please, ignore this message. Romildo -- ___ Surf the Web in a faster, safer and easier way: Download Opera 9 at http://www.opera.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Test. Ignore.

2010-07-21 Thread José Romildo Malaquias
On Wed, Jul 21, 2010 at 12:53:53PM -0300, José Romildo Malaquias wrote: Please, ignore this message. Replying to the list and to the sender, to see if he gets both messages using a non gmail account. Romildo ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Test. Ignore.

2010-07-21 Thread José Romildo Malaquias
- Original Message - From: José Romildo Malaquias j.romi...@gmail.com To: José Romildo Malaquias romi...@operamail.com Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Test. Ignore. Date: Wed, 21 Jul 2010 13:01:03 -0300 On Wed, Jul 21, 2010 at 12:53:53PM -0300, José

Re: [Haskell-cafe] Test. Ignore.

2010-07-21 Thread José Romildo Malaquias
- Original Message - From: José Romildo Malaquias romi...@operamail.com To: José Romildo Malaquias j.romi...@gmail.com Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Test. Ignore. Date: Wed, 21 Jul 2010 13:09:16 -0300 - Original Message - From: José Romildo

Re: [Haskell-cafe] Test. Ignore.

2010-07-21 Thread José Romildo Malaquias
On Wed, Jul 21, 2010 at 01:25:19PM -0300, José Romildo Malaquias wrote: - Original Message - From: José Romildo Malaquias romi...@operamail.com To: José Romildo Malaquias j.romi...@gmail.com Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Test. Ignore. Date: Wed, 21

Re: [Haskell-cafe] Test. Ignore.

2010-07-21 Thread Daniel Fischer
On Wednesday 21 July 2010 18:25:19, José Romildo Malaquias wrote: That was expected, as by default the Avoid duplicate copies of messages? option is set to Yes in the mailing list membership configuration. Now I have just set it to No, and I expect to receive both copies next time someone

Re: [Haskell-cafe] Test. Ignore.

2010-07-21 Thread José Romildo Malaquias
- Original Message - From: José Romildo Malaquias j.romi...@gmail.com To: José Romildo Malaquias romi...@operamail.com Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Test. Ignore. Date: Wed, 21 Jul 2010 13:33:34 -0300 On Wed, Jul 21, 2010 at 01:25:19PM -0300, José

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-21 Thread Rogan Creswick
On Wed, Jul 21, 2010 at 3:00 AM, Magnus Therning mag...@therning.org wrote: I am successfully using hooks with the following in my .cabal file:    Build-Type    : Simple and my main in Setup.hs looks like this:    main = defaultMainWithHooks $ simpleUserHooks        { cleanHook =

Re: [Haskell-cafe] List manager and duplicate copies of messsages

2010-07-21 Thread José Romildo Malaquias
On Wed, Jul 21, 2010 at 12:18:14PM -0300, José Romildo Malaquias wrote: On Wed, Jul 21, 2010 at 02:42:37PM +0200, Martijn van Steenbergen wrote: On 7/21/10 12:48, José Romildo Malaquias wrote: Hello. I have noticed that I do not receive duplicate copies of messages from

Re: [Haskell-cafe] On documentation

2010-07-21 Thread Andrew Coppin
Ivan Miljenovic wrote: * When writing the code, it's obvious what it does; as such you may think any documentation you may offer is trivial (down the track, however...). * The author is familiar with a library; as such it may not be obvious what extra documentation could be needed. This is

Re: [Haskell-cafe] The where-clause and guards

2010-07-21 Thread Eitan Goldshtrom
Aha. I understand now. A single where-clause applies to the entire scope of the function, at all levels. Thanks for the help. -Eitan On 7/21/2010 3:55 AM, Nicolas Wu wrote: Ugh, my formatting got eaten up by gmail. I just removed the where in front of m =, and aligned tat statment with your

[Haskell-cafe] Re: On documentation

2010-07-21 Thread Gour
On Wed, 21 Jul 2010 18:15:08 +0100 Andrew == Andrew Coppin andrewcop...@btinternet.com wrote: Andrew It has really very weak support for writing general Andrew overviews, tutorials, examples, etc. +1 Sincerely, Gour -- Gour | Hlapicina, Croatia | GPG key: F96FF5F6

Re: [Haskell-cafe] On documentation

2010-07-21 Thread Alexander Solla
On Jul 20, 2010, at 10:28 PM, Richard O'Keefe wrote: What I don't see is HOW DO I USE THIS STUFF? I think tutorials are the best way to do that (i.e., example normal forms for the computations the library intends to expose). Perl's package archive (the cpan) traditionally uses a

[Haskell-cafe] Re: Problem with reloading modules in GHC API

2010-07-21 Thread Albert Y . C . Lai
Try adding more delay between the two loadings, e.g., make me press enter, and hope I am not faster than a computer: main = do     writeTarget arg     func0 - compileTarget     putStrLn $ show $ func0 2 getLine     writeTarget arg*2     func1 - compileTarget     putStrLn $ show $ func1 2

Re: [Haskell-cafe] Re: gd on Win32

2010-07-21 Thread Christopher Done
Hi Kevin, You probably have to install the mingw versions of these libraries. Should be trivial to do with mingw's installation manager. Or was that cygwin? The one with the package manager. I haven't used Windows for a while, apologies. On 21 July 2010 09:51, Kevin Jardine

Re: [Haskell-cafe] Re: gd on Win32

2010-07-21 Thread Stephen Tetley
On 21 July 2010 20:17, Christopher Done chrisd...@googlemail.com wrote: Hi Kevin, You probably have to install the mingw versions of these libraries. Should be trivial to do with mingw's installation manager. Or was that cygwin? The one with the package manager. I haven't used Windows for a

[Haskell-cafe] [Ann] New version of parser combinator library uu-parsinglib-2.4.0

2010-07-21 Thread S. Doaitse Swierstra
I have uploaded a new version of the package uu-parsinglib, te collection of online, error-correcting parser combinators, with both an applicative and a monadic interface. * The new version behaves better when more than three corrective steps have to be taken at a specific position. In order

Re: [Haskell-cafe] Data types a la carte

2010-07-21 Thread Sjoerd Visscher
On Jul 21, 2010, at 11:25 AM, Victor Nazarov wrote: 1) UndecidableInstances are required for this code to compile. Is it possible to avoid this language extension? What is the reason for it to be required? The rule No type variable has more occurrences in the assertion than in the head is

[Haskell-cafe] Re: [Haskell] ANNOUNCE: vorbiscomment 0.0.1

2010-07-21 Thread Henk-Jan van Tuyl
Redirecting to Haskell-café On Wed, 21 Jul 2010 19:16:16 +0200, Chris Wagner christopher.t.wag...@gmail.com wrote: I'm happy to announce that I have packaged up my first Haskell library, vorbiscomment, which allows for reading of Vorbis comments from Ogg Vorbis files. The code is rugged

[Haskell-cafe] Re: gd on Win32

2010-07-21 Thread Kevin Jardine
On Jul 21, 10:57 pm, Stephen Tetley stephen.tet...@gmail.com wrote: Given the number of libraries involved, I'd look for an alternative to GD. ___ Yes, I've seen reports that people have tried and failed to install the Haskell GD module on Windows.

Re: [Haskell-cafe] Re: Problem with reloading modules in GHC API

2010-07-21 Thread Hongmin Fan
Thanks! hint works good! On Tue, Jul 20, 2010 at 9:29 PM, Andy Stewart lazycat.mana...@gmail.comwrote: Hongmin Fan hongmin.fan.li...@gmail.com writes: Thanks Andy! Yes, I do need the second approach you listed here. I think the plugin package actually uses GHC API to load too. My

Re: [Haskell-cafe] Re: Problem with reloading modules in GHC API

2010-07-21 Thread Hongmin Fan
This is so weird, if I wait long enough it works, but if I press enter fast enough, still get the wrong answer. On Wed, Jul 21, 2010 at 2:34 PM, Albert Y.C.Lai tre...@vex.net wrote: Try adding more delay between the two loadings, e.g., make me press enter, and hope I am not faster than a

[Haskell-cafe] Re: [Haskell] ANNOUNCE: vorbiscomment 0.0.1

2010-07-21 Thread Antoine Latter
On Wed, Jul 21, 2010 at 10:16 AM, Chris Wagner christopher.t.wag...@gmail.com wrote: I'm happy to announce that I have packaged up my first Haskell library, vorbiscomment, which allows for reading of Vorbis comments from Ogg Vorbis files.  The code is rugged and surely buggy, but any feedback,

[Haskell-cafe] Porting ELF statifier to Haskell!

2010-07-21 Thread C K Kashyap
Hi, At my work we ran into a situation where we started wishing there was a way to take a dynamically linked executable and create a statically linked bundle out of it. Little bit of googling got me to statifier - http://statifier.sourceforge.net/statifier/main.html. The project seems a little old

Re: [Haskell-cafe] music-related problem

2010-07-21 Thread Dean Herington
At 11:53 AM -0700 7/4/10, Michael Mossey wrote: Wondering if I could get some suggestions for coding this problem. A musical document (or score) consists primarily of a list of measures. A measure consists primarily of lists of items. We'll consider only one kind of item: a note. Items have a