[Haskell-cafe] Re: Bug#570284: O: washngo
Hi, Am Mittwoch, den 17.02.2010, 15:35 -0600 schrieb John Goerzen: I no longer use WASH, nor do I have time to maintain it anymore. Orphaning it, and CCing debian-haskell in case someone there has interest in it. we have two option: Taking it over by the Haskell Group, or dropping it from Debian. Therefore my question: Is anyone using Wash? Is it still useful, three years after the last change and with HAppS around? Greetings, Joachim -- Joachim nomeata Breitner Debian Developer nome...@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Bug#570284: O: washngo
Excerpts from Joachim Breitner's message of Thu Feb 25 10:15:08 +0100 2010: Hi, Am Mittwoch, den 17.02.2010, 15:35 -0600 schrieb John Goerzen: I no longer use WASH, nor do I have time to maintain it anymore. Orphaning it, and CCing debian-haskell in case someone there has interest in it. we have two option: Taking it over by the Haskell Group, or dropping it from Debian. Therefore my question: Is anyone using Wash? Is it still useful, three years after the last change and with HAppS around? It's a nice piece of code. I'm not using it either. But its ideas should not be forgotten. What exactly is the problem with supporting it? It's not using many extensions so compiling it should not make any trouble, does it? Maybe someone (I?) should write a .cabal file and add it to hackage. Then everyone who is interested in it can install it using cabal-install. I never want to miss having read some of its code. Marc Weber ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Bug#570284: O: washngo
Hi, Am Donnerstag, den 25.02.2010, 10:27 +0100 schrieb Marc Weber: It's a nice piece of code. I'm not using it either. But its ideas should not be forgotten. What exactly is the problem with supporting it? It's not using many extensions so compiling it should not make any trouble, does it? Maybe someone (I?) should write a .cabal file and add it to hackage. Then everyone who is interested in it can install it using cabal-install. I never want to miss having read some of its code. It’s not even cabalized yet? That would cause even extra work... But if it is cabalized and builds without issues, then supporting it is not much effort (although it’s not Debian’s task to be a code library, people can go to hackage for that). Greetings, Joachim -- Joachim nomeata Breitner Debian Developer nome...@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Proper round-trip HughesPJ/Parsec for Doubles?
Hi Christian, On 24 Feb 2010, at 13:24, Christian Maeder wrote: I hope you don't mind if I make some style comments to your final version. Not at all - thanks! 1. break the line after do (to avoid a layout change when change name or arguments of float' or rename the variable e) I'm not convinced by this; perhaps while editing the code it's useful, but those changes don't happen very often, and when they do, any half- decent editor ought to be able to handle making the change consistently. I do sometimes drop the do to the next line, but usually in order to keep things within 80 columns. I think this is somewhat a matter of personal taste though. More on this at the end... 2. The t :: TokenParser st is only used for the white spaces. This should be done separately (use lexeme from the TokenParser if you really need to). Just using spaces is also an alternative. OK - but what I'm trying to do here is create something I can use as a drop-in replacement for float from Text.ParserCombinators.Parsec.Token - in which case it shouldn't be done separately, I think? 3. liftCtoS is only applied to '-', so an optSign would suffice. optSign = option $ fmap (: []) (char '-') Agreed - although I resurrect it later as maybeChar (see below), matching against a choice of characters (to handle +/-) or returning if empty. (read also allows a capital 'E' and a '+' before the exponent, but no initial '+' sign. OK: didn't catch this because show doesn't (it seems) ever write them like that. Thanks. The decimal point is optional. Same comment. :-) Fixed below, although I remove this optionality for my application (for now) because (I think) I want to be explicit about int vs float... Also NaN and Infinity can be read, both possibly preceded by a '-' sign followed by spaces. But you may restrict yourself to the possible outputs of show, which would include NaN and Infinity, though.) OK. Indeed, it seems an initial '-' can be followed by spaces for other cases, e.g. - 2e4, so have implemented that more general form. Adding the NaN and Infinity cases gives us another level of indent, and pushes us close enough to 80 columns that I've dropped the outermost do to the next line. It may make sense to use something like readMaybe (which is missing in the Prelude) instead of read to allow the parser to fail more nicely. It seems to be kicking up reasonable errors as it is, e.g.: *Main parse aFloat 2e-h Left (line 1, column 4): unexpected h expecting digit I haven't seen any uncaught exceptions propagating, if that's what you're worried about...? Btw I observed the following problem with read (that readMaybe would also not solve). http://hackage.haskell.org/trac/ghc/ticket/3897 Ah, well that's out of scope for me, I fear. :-) So here's what I have now: float' :: TokenParser st - GenParser Char st Double float' t = do n - maybeChar - spaces fs - choice [symbol t NaN, symbol t Infinity, do whole - many1 digit frac - option $ do char '.' ds - many1 digit return $ '.' : ds ex - option $ do choice [char 'e', char 'E'] s - maybeChar +- ds - many1 digit return $ concat [e, s, ds] return $ concat [whole, frac, ex] ] whiteSpace t return $ read $ n ++ fs where maybeChar :: String - GenParser Char st String maybeChar as = option (choice (map char as) = \a - return [a]) You can also break it immediately before do, which I think is sometimes more clear. If not an extra space is added following do this leads to an odd indentation of at least one line. I'm curious: which line in the above is indented oddly? Oh, wait: you don't mean odd as in strange, do you? You mean odd as in not even? So, e.g. the spaces line starts at column 5? What's wrong with that? Cheers! -Andy -- Andy Gimblett http://gimbo.org.uk/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Bug#570284: O: washngo
Hi, It compiles even with ghc HEAD with very minimal cabal adjustments. I will upload it to hackage soon. Whether it is a debian package or not isn't that important (IMHO). Marc Weber ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Proper round-trip HughesPJ/Parsec for Doubles?
Andy Gimblett wrote: 1. break the line after do (to avoid a layout change when change name or arguments of float' or rename the variable e) I'm not convinced by this; perhaps while editing the code it's useful, but those changes don't happen very often, and when they do, any half-decent editor ought to be able to handle making the change consistently. I do sometimes drop the do to the next line, but usually in order to keep things within 80 columns. I think this is somewhat a matter of personal taste though. More on this at the end... I think the implication is that the layout change you mention will cause a version control commit to look like the whole function changed, whereas if you didn't have to alter the indent, it would be clear that the only lines that changed are the one introducing the extra parameter, and any subsequent lines that need to be changed to use the parameter. BTW, to add another option, I like this style: float' t = do ... Thanks, Neil. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Testing and module export lists
What I usually do in such a case is create a separate internal module. The internal module exports everything. Then create a module which defines the public interface. This module simple reexports symbols from the internal module. Now you can create a Test module which has full access to all internal symbols. module Internal where a = 1 b = 2 secret = 42 module Public ( a, b ) where import Internal ( a, b ) module Test where import Internal ( secret ) test = assert $ isUltimateAnswer secret On Wed, Feb 24, 2010 at 10:17 AM, Magnus Therning mag...@therning.org wrote: How do people who like unit testing / property testing deal with export lists? I often find that I do want an export list to reduce clutter in the finished code, but for testing I'd like to expose everything in a module. Is there a nice way to deal with this (using the C pre-processor would not qualify as nice ;-)? Maybe there's a switch that causes GHC to simply ignore the export list of a module and export everything? /M ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Haskell and XML, need some tips from practioners
Hi everyone, I had to transform a 136 page word document into an XML-Document so that it can be imported into an application. The word document contained records in nested tables. Anyway through a very, very tedious process of xslt-transformations I finally have the XML document I need. But now I need to amend the attributes of some elements with looked up values from the outside, the lookup-key is a particular attribute value of the nodes. This I cannot do through xslt processing as the information needed is not within the xml document. I was thus going to use Haskell instead of an XSLT-processor for this final step. My question to those with experience of the Haskell-XML tools: which one should I use? Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Haskell and XML, need some tips from practioners
From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Günther Schmidt Anyway through a very, very tedious process of xslt-transformations I finally have the XML document I need. But now I need to amend the attributes of some elements with looked up values from the outside, the lookup-key is a particular attribute value of the nodes. This I cannot do through xslt processing as the information needed is not within the xml document. Not the answer you were looking for, but... Is the lookup table in another XML document? If so then you might well be able to use the document() function, if your xslt processor supports it e.g. xsl:value-of select=document($lookup-file)/ROWSET/ROW/FUND/FUND_ROW[FND_ID=$fnd-id]/ISIN_CODE/ That said, if you can, use Haskell to do all the transformations i.e. avoid xslt altogether. I despise xslt. Alistair * Confidentiality Note: The information contained in this message, and any attachments, may contain confidential and/or privileged material. It is intended solely for the person(s) or entity to which it is addressed. Any review, retransmission, dissemination, or taking of any action in reliance upon this information by persons or entities other than the intended recipient(s) is prohibited. If you received this in error, please contact the sender and delete the material from any computer. * ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell and XML, need some tips from practioners
Günther == Günther Schmidt gue.schm...@web.de writes: Günther But now I need to amend the attributes of some elements Günther with looked up values from the outside, the lookup-key is a Günther particular attribute value of the nodes. This I cannot do Günther through xslt processing as the information needed is not Günther within the xml document. You probably can. Via implementing some custom URI resolver, or an extension function, or such like. Depending upon the xslt implementation. Not that I'm discouraging you from doing it in Haskell instead. -- Colin Adams Preston Lancashire ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Haskell and XML, need some tips from practioners
Dear Alistair, after working intensely with XSLT again (with a break for several years), I wholeheartedly concur. You guys are right though, through the document function it would be possible. So any particular tool-set you could recommend? Günther Am 25.02.10 15:01, schrieb Bayley, Alistair: From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Günther Schmidt Anyway through a very, very tedious process of xslt-transformations I finally have the XML document I need. But now I need to amend the attributes of some elements with looked up values from the outside, the lookup-key is a particular attribute value of the nodes. This I cannot do through xslt processing as the information needed is not within the xml document. Not the answer you were looking for, but... Is the lookup table in another XML document? If so then you might well be able to use the document() function, if your xslt processor supports it e.g. xsl:value-of select=document($lookup-file)/ROWSET/ROW/FUND/FUND_ROW[FND_ID=$fnd-id]/ISIN_CODE/ That said, if you can, use Haskell to do all the transformations i.e. avoid xslt altogether. I despise xslt. Alistair * Confidentiality Note: The information contained in this message, and any attachments, may contain confidential and/or privileged material. It is intended solely for the person(s) or entity to which it is addressed. Any review, retransmission, dissemination, or taking of any action in reliance upon this information by persons or entities other than the intended recipient(s) is prohibited. If you received this in error, please contact the sender and delete the material from any computer. * ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Re: Haskell and XML, need some tips from practioners
From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Günther Schmidt You guys are right though, through the document function it would be possible. So any particular tool-set you could recommend? On Windows, the Microsoft xslt processor supports document(), I believe. Other than that, I have no recommendations. Alistair * Confidentiality Note: The information contained in this message, and any attachments, may contain confidential and/or privileged material. It is intended solely for the person(s) or entity to which it is addressed. Any review, retransmission, dissemination, or taking of any action in reliance upon this information by persons or entities other than the intended recipient(s) is prohibited. If you received this in error, please contact the sender and delete the material from any computer. * ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Multiple Interpretations for a monad?
Hi everyone, in my attempts to remove boilerplate and thus to do more abstraction I come across a number of interesting things and suggestions. Especially blog posts from Dan Piponi and also Heinrich Apfelmus. I think what they both are saying is that you can construct / implement some sort of 2 layered monad which can then have more than one interpretation. In the responses to one of my posts on DSLs Dan Piponi also points out that he considers monads also to be DSLs. It didn't click with me when he said it, but reading more of his blog posts made me remember that. Now I know this is probably something obvious to most haskellers, but to me it's not. Did I understand this correctly so far? Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell and XML, need some tips from practioners
Hi Alistair, sorry, misunderstanding. I meant which *Haskell* - XML-tools. Günther Am 25.02.10 15:44, schrieb Bayley, Alistair: From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Günther Schmidt You guys are right though, through the document function it would be possible. So any particular tool-set you could recommend? On Windows, the Microsoft xslt processor supports document(), I believe. Other than that, I have no recommendations. Alistair * Confidentiality Note: The information contained in this message, and any attachments, may contain confidential and/or privileged material. It is intended solely for the person(s) or entity to which it is addressed. Any review, retransmission, dissemination, or taking of any action in reliance upon this information by persons or entities other than the intended recipient(s) is prohibited. If you received this in error, please contact the sender and delete the material from any computer. * ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Some great results on fused code with the LLVM backend
Felipe Lessa schrieb: On Wed, Feb 24, 2010 at 01:28:56PM -0500, Edward Kmett wrote: * GHC/LLVM bytecode with JIT-option? There is little preventing this one. Oh, what a great idea! C code being inlined into Haskell functions! :D How about LLVM inline assembly code? You can already do this using the 'llvm' package. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Multiple Interpretations for a monad?
Monads aren't necessarily EDSLs by themselves but are often shipped with functions that provide what would make them an EDSL. Take the State monad, it has at least a get and a put function to work with the state in the monad. That get and put are commands that function only within the domain of the State monad, and therefore could be thought of as an embedded language that is used to work with the state encapsulated in the State Monad computation. The way I like to think of it, a Monad provides an environment or a context within which it is very convenient to express an EDSL, and that this style of coding should be encouraged! :-) Dave 2010/2/25 Günther Schmidt gue.schm...@web.de Hi everyone, in my attempts to remove boilerplate and thus to do more abstraction I come across a number of interesting things and suggestions. Especially blog posts from Dan Piponi and also Heinrich Apfelmus. I think what they both are saying is that you can construct / implement some sort of 2 layered monad which can then have more than one interpretation. In the responses to one of my posts on DSLs Dan Piponi also points out that he considers monads also to be DSLs. It didn't click with me when he said it, but reading more of his blog posts made me remember that. Now I know this is probably something obvious to most haskellers, but to me it's not. Did I understand this correctly so far? Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell and XML, need some tips from practioners
Günther Schmidt gue.schm...@web.de writes: My question to those with experience of the Haskell-XML tools: which one should I use? You'll need to evaluate which one fits your needs best; in my mind the contenders are: -- xml: http://hackage.haskell.org/package/xml Small, simple, comprehensible DOM interface with some simple search + cursor functions, uses String internally. If performance is not a concern this one is the nicest in my opinion. -- hexpat: http://hackage.haskell.org/package/hexpat A binding to the expat C library; super-fast as a result, most of the useful functions from xml have been ported over here. Has support for SAX parsing. This is the one I usually use when I don't need things like DTD validation or XPath support (i.e. 100% of the time). Not much in the way of docs (haddock only) but it's small enough to be comprehensible. -- HXT: http://hackage.haskell.org/package/hxt Dauntingly enormous, oodles of features, you need to grok arrows. Uses String internally. The documentation is pretty iffy -- individual modules are haddocked pretty well but there are a zillion of them and a table of contents is sorely needed. Website docs/manuals are of the read this wiki page, this paper, and my master's thesis variety, but the wiki page is actually pretty good. This is the one I use when I need a feature hexpat doesn't have, but normally I avoid it if I can because arrows cause me to grind the gears. -- HaXml: http://hackage.haskell.org/package/HaXml Lots of modules and features here, uses String internally, has the same table of contents issue as HXT, manual seems to consist of an ICFP paper from 1999, Haddock is a little terse/spotty. Hope this helps, G -- Gregory Collins g...@gregorycollins.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell and XML, need some tips from practioners
Günther == Günther Schmidt gue.schm...@web.de writes: Günther Dear Alistair, after working intensely with XSLT again Günther (with a break for several years), I wholeheartedly concur. Günther You guys are right though, through the document function it Günther would be possible. Günther So any particular tool-set you could recommend? Saxon is by far the best, if you're happy with a java program. (I can hardly recommend my own. Not through modesty, of which I am not over-endowed, but because I refuse to support it since the W3C abolished the concept of XML as self-describing data.) -- Colin Adams Preston Lancashire ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell and XML, need some tips from practioners
Hello Gregory, we have pretty much come to the same conclusion :) Günther Am 25.02.10 17:17, schrieb Gregory Collins: Günther Schmidtgue.schm...@web.de writes: My question to those with experience of the Haskell-XML tools: which one should I use? You'll need to evaluate which one fits your needs best; in my mind the contenders are: -- xml: http://hackage.haskell.org/package/xml Small, simple, comprehensible DOM interface with some simple search + cursor functions, uses String internally. If performance is not a concern this one is the nicest in my opinion. -- hexpat: http://hackage.haskell.org/package/hexpat A binding to the expat C library; super-fast as a result, most of the useful functions from xml have been ported over here. Has support for SAX parsing. This is the one I usually use when I don't need things like DTD validation or XPath support (i.e. 100% of the time). Not much in the way of docs (haddock only) but it's small enough to be comprehensible. -- HXT: http://hackage.haskell.org/package/hxt Dauntingly enormous, oodles of features, you need to grok arrows. Uses String internally. The documentation is pretty iffy -- individual modules are haddocked pretty well but there are a zillion of them and a table of contents is sorely needed. Website docs/manuals are of the read this wiki page, this paper, and my master's thesis variety, but the wiki page is actually pretty good. This is the one I use when I need a feature hexpat doesn't have, but normally I avoid it if I can because arrows cause me to grind the gears. -- HaXml: http://hackage.haskell.org/package/HaXml Lots of modules and features here, uses String internally, has the same table of contents issue as HXT, manual seems to consist of an ICFP paper from 1999, Haddock is a little terse/spotty. Hope this helps, G ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] hdbc-mysql fails to compile
Hi there. Looks like hdbc-mysql cannot compile against GHC-6.12 -- confirmed by the hackage build logs. [1] anyone know a way to dodge the problem ? cheers, Tom [1] http://hackage.haskell.org/packages/archive/HDBC-mysql/0.6/logs/failure/ghc-6.12 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] hdbc-mysql fails to compile
Am Donnerstag 25 Februar 2010 20:01:34 schrieb Thomas Girod: Hi there. Looks like hdbc-mysql cannot compile against GHC-6.12 -- confirmed by the hackage build logs. [1] Change in the Cabal API. anyone know a way to dodge the problem ? Rewrite Setup.[l]hs to work with the new API or pester the maintainer to do it. cheers, Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] hdbc-mysql fails to compile
replying to myself. there is only one line to fix in Setup.lhs (mysqlConfigProg, _) - requireProgram verbosity mysqlConfigProgram AnyVersion (withPrograms lbi) becomes : (mysqlConfigProg, _) - requireProgram verbosity mysqlConfigProgram (withPrograms lbi) obviously the new cabal version makes a difference between requireProgram and requireProgramVersion On Thu, Feb 25, 2010 at 08:01:34PM +0100, Thomas Girod wrote: Hi there. Looks like hdbc-mysql cannot compile against GHC-6.12 -- confirmed by the hackage build logs. [1] anyone know a way to dodge the problem ? cheers, Tom [1] http://hackage.haskell.org/packages/archive/HDBC-mysql/0.6/logs/failure/ghc-6.12 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] hmake and hat
Hi, I made hmake compile on Debian again, but it seems it’s not working yet properly. This also affects hat, as it uses hmake to compile. I guess we could just drop hmake and hat, but this is Debian, and we try to avoid dropping stuff that made it into a stable release. Is anyone interested in figuring out whats wrong with hmake and how to make hat compile again? Also, to haskell-cafe, are there any hat users out there? Greetings, Joachim -- Joachim nomeata Breitner Debian Developer nome...@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] datakind declaration
On Tue, Feb 23, 2010 at 1:08 AM, Paul Brauner paul.brau...@loria.fr wrote: Hello, I remember seeing something like typedata T = A | B somewhere, where A and B are type constructors, but I can't find it in the ghc doc. Have I been dreaming or is it some hidden feature ? Paul ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe This is similar to what you are thinking of: http://hackage.haskell.org/trac/ghc/wiki/KindSystem ...but it's not implemented (yet). ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Heterogeneous Data Structures - Nested Pairs and functional references
On Feb 24, 2010, at 10:15 AM, Heinrich Apfelmus wrote: Namely, let's assume we are already given a magic type constructor |- (so magic that it's not even legal Haskell syntax) with the property that A |- B somehow denotes an expression of type B with free variables of type A . In other words, the result of type B is somehow allowed to depend on values of type A . In the context of this post, when I say functor, I don't mean a Functor instance. I mean the mathematical object which maps between categories. As you noted, functions satisfy your magic. A function from a type A to B is a functor from A to B from a different point of view. (One is in some kind of algebra in A and B, and the other is in the category of small categories). But you lose something important by using functions. Consider the parallel type specification of (my) Views with types, guided by your example code: concat_views :: a - v - v - (a, (v, v)) -- v's are meant to be the result of calling a *_view function. nest_views :: a - v - v - v - (a, (v, v, v)) page_view :: a - v - v - v - v - (a, [v]) text_view:: String - v - (String, v) As you can see from the types, these are functions that take values and wrap them up. These functions trivially induce functors of the form View a :: v - (a, [v]) (let's call them lists for the purposes of form since there can be any number of v's). What are we gaining? What are we losing? My Functor-based implementation had a uniform interface to all the View's innards, which we have lost. And if we want to turn these functions into an algebra, we need to define a fair amount of plumbing. If you take the time to do that, you'll see that the implementation encodes a traversal for each of result types. An fmap equivalent for this implementation. In short, before you can do anything with your construct, you will need to normalize the return result. You can do that by reifying them: data View view = EmptyView | TextView String | ConcatViews (View view) (View view) | ... or by doing algebra on things of the form (a, [v]). Notice, also, that the View view data constructors are (basically) functions of the form [View] - (a, [View]) or a - (a, [View]) for some a. (The tricky bit is the some a part. Consider why EmptyView and (TextView String) is a (View view) no matter what type view is). The parallel for EmptyView is: empty_view :: a - v - (a, v) empty_view a v = (a, ()) --? I guess that works. Dummy arguments for empty things. Ikky. My example code had some problems, but I really think it's a superior solution for the problem of making reusable renderable fragments. Indeed, this post described how I refactored your approach into mine, when I wrote my View code in the first place. Then again, I also got tired of wrestling with Data.Foldable and moved on to using a plain initial algebra and Uniplate. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Interested in the Dutch HUG Day (24 April 2010)?
In honor of the first anniversary of the Dutch Haskell Users Group (formed at Hac5 in Utrecht), we are planning a mini symposium to bring together Haskell and functional programming enthusiasts in the Netherlands and surrounding area. *The Dutch HUG Day will be held on Saturday, 24 April.* Please mark that date in your calendar. The remaining details are being worked out. In order to help us with this process, we have created a short survey. If you are even remotely considering attending, please take a moment to fill out a form with your name and the activities that interest you. * http://spreadsheets.google.com/viewform?formkey=dGVuVTdnZEl0ZDE3MEVweUtRdmlnZGc6MA Note that this does not commit you to anything. We will only use this information to help plan the event (e.g. determine the number of seats at the location and the types of activities). For more information about the Dutch HUG, visit the wiki page and sign up for the mailing list. * http://www.haskell.org/haskellwiki/Dutch_HUG * http://groups.google.com/group/dutch-hug Thanks for your time! Sincerely, The Dutch HUG Day planning team ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Testing and module export lists
Magnus Therning schrieb: On Wed, Feb 24, 2010 at 10:41, Arnaud Bailly arnaud.oq...@gmail.com wrote: Maybe you just want to test what's in your export list which represents the public interface of your code. And if you cannot write a test that exercise private implementation through the public interface, then maybe there is a design problem... Possibly! The specific case I have is a module for parsing a small language. The module exports a single function, a function that takes a string and returns a tree. Of course the parser is built using parser combinators. I'd like to test each combinator I've built, but I don't want to export them all. The only way I see of achieving this is to split each module in two, one public and one internal, where the public one just re-exports the relevant pieces of the internal one. That's workable, but hardly aesthetically pleasing ;-) It can be tedious to manage two variants of each module, but I often had to go this way anyway in order to avoid cyclic dependencies or because some modules need internals of other modules of the same package. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Linear programming in Haskell
Yo, Man, I'd never used FFI before, but it's really not as scary as I'd feared. I've implemented a more comprehensive interface to GLPK's simplex solver and -- rather importantly, for my own needs -- its MIP solver. This doesn't depend on hmatrix, and in fact, it doesn't require any matrix or vector manipulation at all -- linear functions are specified as a straight-up Data.Map from an arbitrary variable type to their coefficients. The library is now available as glpk-hs on hackage. Example: import Data.LinearProgram.LPMonad import Data.LinearProgram import Data.LinearProgram.GLPK objFun :: LinFunc String Int objFun = linCombination [(10, x1), (6, x2), (4, x3)] lp :: LP String Int lp = execLPM $ dosetDirection Max setObjective objFun leqTo (varSum [x1, x2, x3]) 100 leqTo (10 *^ var x1 ^+^ 4 * x2 ^+^ 5 *^ var x3) 600 -- c *^ var v, c * v, and linCombination [(c, v)] are all equivalent. -- ^+^ is the addition operation on linear functions. leqTo (linCombination [(2, x1), (2, x2), (6, x3)]) 300 varGeq x1 0 varBds x2 0 50 varGeq x3 0 setVarKind x1 IntVar setVarKind x2 ContVar main = print = glpSolveVars mipDefaults lp This requires GLPK to be installed, like below. Louis Wasserman wasserman.lo...@gmail.com http://profiles.google.com/wasserman.louis On Wed, Feb 24, 2010 at 4:07 AM, Alberto Ruiz ar...@um.es wrote: I have uploaded to hackage an interface to the simplex algorithm based on GLPK. It is a very early version, it will probably have lots of problems. In the future I would like to add support for integer variables (MIP). Any suggestion is welcome. This is an example taken from glpk-utils: http://code.haskell.org/hmatrix/packages/glpk/examples/simplex3.hs Documentation: http://perception.inf.um.es/~aruiz/hmatrix-glpk/http://perception.inf.um.es/%7Earuiz/hmatrix-glpk/ Installation: $ sudo apt-get install libglpk-dev $ cabal update $ cabal install hmatrix-glpk If hmatrix is not installed we also need $ sudo apt-get install libgsl0-dev liblapack-dev I hope it is useful, Alberto Erik de Castro Lopo wrote: Alberto Ruiz wrote: I think that GSL does not include linear programming solvers, but in the GSL home page there is a reference to the GLPK package: http://www.gnu.org/software/glpk/glpk.html I have not used it, but it would be very nice to have a simple Haskell interface to GLPK (or other similar library) in hmatrix or as a separate package. I will take a look at this. I used GLPK many years ago and I found it excellent. Erik ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Linear programming in Haskell
On Thursday 18 February 2010 11:26:02 Ozgur Akgun wrote: I've no idea about the GLPK system. But, isn't it the case that you can transform any linear inequality into a linear equality and a slack (or excess) variable? Well yes, but the slack variables are constrained to be nonnegative, which isn't essentially different from having arbitrary inequalities (but it's convenient). The problem doesn't reduce to solving a system of linear equalities (as an illustration of how it's more tricky than linear equalities, the question of whether the problem is in P was settled quite recently, in 1972. (Recently when compared to classical linear algebra :))). Greetings, Daniel ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Function to detect duplicates
Just to clarify the issue, I will propose the puzzle: There is a single 10 digit number that: 1) uses all ten digits [0..9], with no repetitions 2) the number formed by the first digit (right to left, most significant) is divisible by one 3) the number formed by the first 2 digits (again right to left) is divisible by two 4) the number formed by the first 3 digits is divisible by three and so on, until: 11) the number formed by the first 10 digits (all!) is by 10 Actually this can be solved by a little logic, but I wanted to give a try on brute force search using haskell. I am not looking very large lists, but I was expecting a handful of small lists. My algorithm follow these steps: 1) start with an list of empty list ([[]]), call it ds 2) I cons each member of [0..9] to ds 3) filter using: a) noneRepeated b) (listToNum d) `mod` l == 0, where l is the length of each sublist d (not computed, it is an accumulator that is incremented each time I cons) 4) repeat steps 2-3 until l==10 So, I represent each possible number as a reversed list of its digits... It ran REALLY fast (sub-second). So, bragging about Haskell with a Smalltalk-lover friend, by showing him how clean was the code and how easy was to profile, I figured out that I spent 99% on noneRepeated. After changing to the merge sort version, I have 30% on noneRepeated, 30% on listToNum and 30% on putStrLn. Pretty good! Besides, I could brag a little more about Hakell to that specific friend!! ;-) Best regards to you all!! Rafael PS: Here is the original search code, with the bad noneRepeated and still using length import Data.List digits=[0..9] noneRepeated::[Integer]-Bool noneRepeated=null.(filter (1)).(map length).group.sort listToNum::[Integer]-Integer listToNum = (foldl (\a x-10*a+x) 0).reverse check::[Integer]-Bool check ds= and [noneRepeated ds, (listToNum ds) `mod` l==0] where l=fromIntegral $ length ds nextlevel::[[Integer]]-[[Integer]] nextlevel dss=filter (check) [d:ds | ds-dss,d-digits] main=do dss-runlevel 10 0 [[]] print $ map (listToNum) dss runlevel 0 b dds=return dds runlevel a b dds=do let dds'=nextlevel dds putStrLn $ Level ++(show (b+1))++: ++(show $ length dds')++ matches print $ map (listToNum) dds' runlevel (a-1) (b+1) dds' ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Function to detect duplicates
Am Freitag 26 Februar 2010 00:57:48 schrieb Rafael Gustavo da Cunha Pereira Pinto: Just to clarify the issue, I will propose the puzzle: There is a single 10 digit number that: 1) uses all ten digits [0..9], with no repetitions 2) the number formed by the first digit (right to left, most significant) is divisible by one 3) the number formed by the first 2 digits (again right to left) is divisible by two 4) the number formed by the first 3 digits is divisible by three and so on, until: 11) the number formed by the first 10 digits (all!) is by 10 Actually this can be solved by a little logic, but I wanted to give a try on brute force search using haskell. Okay, so I won't talk about choosing a better algorithm :) I am not looking very large lists, but I was expecting a handful of small lists. And these are so short that actually noneRepeated xs = xs == nub xs is *faster* than sorting and grouping. My algorithm follow these steps: 1) start with an list of empty list ([[]]), call it ds 2) I cons each member of [0..9] to ds 3) filter using: a) noneRepeated b) (listToNum d) `mod` l == 0, where l is the length of each Reverse the tests, \l d - (listToNum d) `mod` l == 0 is cheap in comparison to noneRepeated, even with noneRepeated xs = xs == nub xs. sublist d (not computed, it is an accumulator that is incremented each time I cons) 4) repeat steps 2-3 until l==10 So, I represent each possible number as a reversed list of its digits... It ran REALLY fast (sub-second). So, bragging about Haskell with a Smalltalk-lover friend, by showing him how clean was the code and how easy was to profile, I figured out that I spent 99% on noneRepeated. That doesn't run long enough to get a reliable profile, even if you reduce the tick-time to 1ms. After changing to the merge sort version, I have 30% on noneRepeated, 30% on listToNum and 30% on putStrLn. Pretty good! Besides, I could brag a little more about Hakell to that specific friend!! ;-) Best regards to you all!! Rafael PS: Here is the original search code, with the bad noneRepeated and still using length import Data.List digits=[0..9] noneRepeated::[Integer]-Bool noneRepeated=null.(filter (1)).(map length).group.sort listToNum::[Integer]-Integer listToNum = (foldl (\a x-10*a+x) 0).reverse Doesn't really matter, but try to acquire the habit of using foldl' rather than foldl (unless you need foldl for its additional laziness). You'll run into fewer laziness leaks that way. check::[Integer]-Bool check ds= and [noneRepeated ds, (listToNum ds) `mod` l==0] where l=fromIntegral $ length ds Use () if you have only two tests. nextlevel::[[Integer]]-[[Integer]] nextlevel dss=filter (check) [d:ds | ds-dss,d-digits] Why not move the checks into the generation, nextlevel dss = filter ((== 0) . (`mod` l) . listToNum) [d:ds | ds - dss, d - digits, d `notElem` ds] where l = 1 + length (head dss) or nextlevel dss = let l = 1 + length (head dss) in [d:ds | ds - dss, let n = 10*listToNum ds , d - digits, d `notElem` ds, (n+d) `mod` l == 0] ? At least the d `notElem` ds seems very natural here (and it's more efficient, too). main=do dss-runlevel 10 0 [[]] print $ map (listToNum) dss runlevel 0 b dds=return dds runlevel a b dds=do let dds'=nextlevel dds putStrLn $ Level ++(show (b+1))++: ++(show $ length dds')++ matches print $ map (listToNum) dds' runlevel (a-1) (b+1) dds' ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] hdbc-mysql fails to compile
Hi Thomas, up to 3/3/2010 I am looking after nearly 100 Haskell newbies in their project end phase -- but Marc Weber promised to kick my ass in time so I look after the hsql-XXX repos. Anyway, I just uploaded 1.8.1, since it seems to work. Cheers, Nick Thomas Girod wrote: replying to myself. there is only one line to fix in Setup.lhs (mysqlConfigProg, _) - requireProgram verbosity mysqlConfigProgram AnyVersion (withPrograms lbi) becomes : (mysqlConfigProg, _) - requireProgram verbosity mysqlConfigProgram (withPrograms lbi) obviously the new cabal version makes a difference between requireProgram and requireProgramVersion On Thu, Feb 25, 2010 at 08:01:34PM +0100, Thomas Girod wrote: Hi there. Looks like hdbc-mysql cannot compile against GHC-6.12 -- confirmed by the hackage build logs. [1] anyone know a way to dodge the problem ? cheers, Tom [1] http://hackage.haskell.org/packages/archive/HDBC-mysql/0.6/logs/failure/ghc-6.12 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Multiple Interpretations for a monad?
To take this a step further, there is the DSL: get :: m S put :: S - m () and the concrete implementation m = State S Of course, there are other monads which implement this DSL as well: m = StateT S IO m = Prompt StatePrompt with data StatePrompt a where Get :: StatePrompt S Put :: S - StatePrompt () The Prompt solution(1) encodes your program (object of type Prompt StatePrompt a) into a way such that it can be used with *any* interpreter, whether it is the (s - (a,s)) of State, or lifted into part of some larger DSL, or whatever. For example, to lift into StateT S IO: interpretPrompt :: Prompt StatePrompt a - StateT S IO a interpretPrompt = runPromptM f where f :: StatePrompt a - StateT S IO a f Get = get f (Put x) = put x So, I think a better way to describe it is that a DSL could be implemented by many monads, and some monads let you interpret the DSL into another monad. Even StateT is this way, in a sense; you interpret it with runStateT: runStateT myProgram initialState :: IO (S, a) Now you have another program in a different monad (IO) which you need to interpret somehow. -- ryan (1) http://hackage.haskell.org/package/MonadPrompt 2010/2/25 David Leimbach leim...@gmail.com: Monads aren't necessarily EDSLs by themselves but are often shipped with functions that provide what would make them an EDSL. Take the State monad, it has at least a get and a put function to work with the state in the monad. That get and put are commands that function only within the domain of the State monad, and therefore could be thought of as an embedded language that is used to work with the state encapsulated in the State Monad computation. The way I like to think of it, a Monad provides an environment or a context within which it is very convenient to express an EDSL, and that this style of coding should be encouraged! :-) Dave 2010/2/25 Günther Schmidt gue.schm...@web.de Hi everyone, in my attempts to remove boilerplate and thus to do more abstraction I come across a number of interesting things and suggestions. Especially blog posts from Dan Piponi and also Heinrich Apfelmus. I think what they both are saying is that you can construct / implement some sort of 2 layered monad which can then have more than one interpretation. In the responses to one of my posts on DSLs Dan Piponi also points out that he considers monads also to be DSLs. It didn't click with me when he said it, but reading more of his blog posts made me remember that. Now I know this is probably something obvious to most haskellers, but to me it's not. Did I understand this correctly so far? Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] haddock installation weirdness?
I'm on Mac OS X Snow Leopard, and can't get haddock installed due to the following error: Resolving dependencies... Configuring haddock-2.6.0... Warning: This package indirectly depends on multiple versions of the same package. This is highly likely to cause a compile failure. package haddock-2.6.0 requires Cabal-1.8.0.2 package ghc-6.12.1 requires Cabal-1.8.0.2 package bin-package-db-0.0.0.0 requires Cabal-1.8.0.2 Preprocessing library haddock-2.6.0... Preprocessing executables for haddock-2.6.0... unused terminals: 1 Building haddock-2.6.0... command line: cannot satisfy -package-id ghc-6.12.1-b691a185e99c62533666d9a28a9e1988: ghc-6.12.1-b691a185e99c62533666d9a28a9e1988 is unusable due to missing or recursive dependencies: Cabal-1.8.0.2-a08510b9460f1b65f9dee06ed53f0650 bin-package-db-0.0.0.0-0c559ebe951f9972c4e6dfe5ebd4ce6a (use -v for more information) cabal: Error: some packages failed to install: haddock-2.6.0 failed during the building phase. The exception was: ExitFailure 1 When I do a ghc-pkg list | grep Cabal I get the following: ghc-pkg list | grep Cabal Cabal-1.8.0.2 Cabal-1.8.0.2 I'm wondering if this means I have a copy in my .cabal, and another from GHC,and if that could be causing a problem? I'm trying to work on the Haddock docs for the NineP package I uploaded the other day, and would rather not have to finish uploading before previewing the result :-) Dave ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: haddock installation weirdness?
This might be heavy handed but I think I just got over this by clobbering my .ghc directory and redoing cabal install haddock Dave On Thu, Feb 25, 2010 at 7:23 PM, David Leimbach leim...@gmail.com wrote: I'm on Mac OS X Snow Leopard, and can't get haddock installed due to the following error: Resolving dependencies... Configuring haddock-2.6.0... Warning: This package indirectly depends on multiple versions of the same package. This is highly likely to cause a compile failure. package haddock-2.6.0 requires Cabal-1.8.0.2 package ghc-6.12.1 requires Cabal-1.8.0.2 package bin-package-db-0.0.0.0 requires Cabal-1.8.0.2 Preprocessing library haddock-2.6.0... Preprocessing executables for haddock-2.6.0... unused terminals: 1 Building haddock-2.6.0... command line: cannot satisfy -package-id ghc-6.12.1-b691a185e99c62533666d9a28a9e1988: ghc-6.12.1-b691a185e99c62533666d9a28a9e1988 is unusable due to missing or recursive dependencies: Cabal-1.8.0.2-a08510b9460f1b65f9dee06ed53f0650 bin-package-db-0.0.0.0-0c559ebe951f9972c4e6dfe5ebd4ce6a (use -v for more information) cabal: Error: some packages failed to install: haddock-2.6.0 failed during the building phase. The exception was: ExitFailure 1 When I do a ghc-pkg list | grep Cabal I get the following: ghc-pkg list | grep Cabal Cabal-1.8.0.2 Cabal-1.8.0.2 I'm wondering if this means I have a copy in my .cabal, and another from GHC,and if that could be causing a problem? I'm trying to work on the Haddock docs for the NineP package I uploaded the other day, and would rather not have to finish uploading before previewing the result :-) Dave ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] hmake and hat
Can you provide a link to something describing the error? -- Jason Dusek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] vector to uvector and back again
Dan, do you think you might be releasing your port of uvector-algorithms to vector any time soon? I've ported mwc-random to use vector, and I'd like to move statistics (which needs uvector-algorithms) and criterion (ditto) too. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] vector to uvector and back again
On Friday 26 February 2010 12:13:56 am Bryan O'Sullivan wrote: Dan, do you think you might be releasing your port of uvector-algorithms to vector any time soon? I've ported mwc-random to use vector, and I'd like to move statistics (which needs uvector-algorithms) and criterion (ditto) too. I don't want to hold anything up, so I've released the port to vector. It's available on hackage as vector-algorithms 0.3: http://hackage.haskell.org/package/vector-algorithms It's mostly a straight port, so not much new to learn. - There's no .Array in the module names anymore. - The Schwartzian transform combinators are gone from Data.Vector.Algorithms.Combinators, because I haven't decided on the best way to handle those yet (the existing implementation won't work on all vectors in the MVector class). Hope that isn't a problem. - There's also a new module D.V.A.Search, which so far implements a couple variations on binary search. It was something I was starting before the switch to vector, so it isn't complete yet. There are some moderate performance regressions on some of the algorithms, but nothing major. Also, the optimizer in 6.12 seems to get very confused when working with IO as the PrimMonad in question, resulting in significantly worse performance. So, I'd recommend sticking with ST, or at least making sure the algorithms are called in ST, with stToIO. HEAD is better on both these fronts, so things should get better in the future. Let me know if there are any issues.* -- Dan * P.S. I just noticed I left the .cabal recommending -O2 and -fvia-c -optc-O3. That's obviously not current since the .cabal is set to compile with -Odph and with the NCG. I'll amend that in a later version. :) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell and XML, need some tips from practioners
Gregory Collins g...@gregorycollins.net writes: xml: http://hackage.haskell.org/package/xml hexpat: http://hackage.haskell.org/package/hexpat HXT: http://hackage.haskell.org/package/hxt HaXml: http://hackage.haskell.org/package/HaXml After experimenting with a couple of the above, I ended up using tagsoup, which is relatively fast and (very) simple - but useful for just extracting data without validation or any real XML stuff. In my case, the files were fairly large, which didn't go down well with the more proper XML parsers I tried. (This may have changed in later times, of course.) -k -- If I haven't seen further, it is by standing in the footprints of giants ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe