[Haskell-cafe] Re: Using Takusen is a real intellectual challenge

2009-05-04 Thread oleg
Perhaps you might find the following code, relying on low-level Takusen's functions, useful http://darcs.haskell.org/takusen/Database/PostgreSQL/Test/pgaccess.hs The code is a stand-alone program that does the following: docstrings = [ "A helper to access a PostgreSQL from a `sc

Re: [Haskell-cafe] Re: StateT IO Action on `onKeyPress`

2009-05-04 Thread Ryan Ingram
Something like this: -- Replaces "runStateT" for callbacks that might affect the state invert :: IORef s -> StateT s IO a -> IO a invert r m = do s <- readIORef r (a, s') <- runStateT m s writeIORef r s' return a -- Replaces "liftIO" when the action called might use "invert" rever

Re: [Haskell-cafe] ANN: atom-0.0.2

2009-05-04 Thread John Van Enk
If any one has been looking at this and wants another example, I've finished two posts on the topic of Atom. These posts depend on a patch: http://code.sw17ch.com/blog/atom/atom_0.0.2_sw17ch_1.diff Part 1: http://blog.sw17ch.com/wordpress/?p=84 <- Brief discussion and describes the patch Part 2:

Re: [Haskell-cafe] A brief note on n_k patterns and Hackage

2009-05-04 Thread Lennart Augustsson
I presume that is a joke, but it's not very funny. On Mon, May 4, 2009 at 6:48 PM, Richard O'Keefe wrote: > [about n+k in Hackage] > On 5 May 2009, at 12:23 pm, John Van Enk wrote: > >> Which package? > > There are at least two occurrences of n+1 as a pattern. > If anyone wants to get rid of them

Re: [Haskell-cafe] Using Takusen is a real intellectual challenge

2009-05-04 Thread David Leimbach
O-kay? On Mon, May 4, 2009 at 5:00 PM, Gü?nther Schmidt wrote: > Hi, > > well I'm *trying* to use Takusen to export from one database into the > other. > I'm using Takusen for this so that I can guarantee that during the export > not a single huge result is assembled (possibly in memory)

Re: [Haskell-cafe] A brief note on n_k patterns and Hackage

2009-05-04 Thread Richard O'Keefe
[about n+k in Hackage] On 5 May 2009, at 12:23 pm, John Van Enk wrote: Which package? There are at least two occurrences of n+1 as a pattern. If anyone wants to get rid of them, I'd like them to work as hard at this as I did... ___ Haskell-Cafe mai

Re: [Haskell-cafe] instance Monad (Except err)

2009-05-04 Thread Tony Morris
Yes, however, ap is not equal to (<*>) for the given Applicative. I don't believe such a monad is possible. Neil Brown wrote: > Martijn van Steenbergen wrote: >> Hello, >> >> Mr. McBride and mr. Paterson define in their Applicative paper: >> >>> data Except e a = OK a | Failed e >>> instance Monoi

Re: [Haskell-cafe] Re: applicative challenge

2009-05-04 Thread Conor McBride
Hi Achim On 5 May 2009, at 01:26, Achim Schneider wrote: Conor McBride wrote: Remember folks: Missiles need miffy! H. Iff you have something like CoPointed or Foldable, you can thread your own, Applicative, tail back into yourself and decide what you are by inspecting it. Yeah, Appli

[Haskell-cafe] Re: A brief note on n_k patterns and Hackage

2009-05-04 Thread Achim Schneider
John Van Enk wrote: > Which package? > More importantly, is it a recent version, that's still live? Does it compile with ghc > 5.2? -- (c) this sig last receiving data processing entity. Inspect headers for copyright history. All rights reserved. Copying, hiring, renting, performance and/or qu

Re: [Haskell-cafe] A brief note on n_k patterns and Hackage

2009-05-04 Thread Don Stewart
I think the Hinze streams package I uploaded on Sunday uses n+k... http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hinze-streams-1.0 turn :: (Integral a) => a -> [a] turn 0= [] turn (n + 1) = turn n ++ [n] ++ turn n vanenkj: > Which package? > > /jve > > >

[Haskell-cafe] Re: applicative challenge

2009-05-04 Thread Achim Schneider
Conor McBride wrote: > Remember folks: Missiles need miffy! > H. Iff you have something like CoPointed or Foldable, you can thread your own, Applicative, tail back into yourself and decide what you are by inspecting it. That makes foldr the join of Hask itself, or something. Bear with me, I

Re: [Haskell-cafe] A brief note on n_k patterns and Hackage

2009-05-04 Thread John Van Enk
Which package? /jve On Mon, May 4, 2009 at 8:04 PM, Richard O'Keefe wrote: > I never really understood why it was thought to be relevant, > but I was challenged to show that n+k patterns occurred in > Hackage. > > Last week I downloaded it. I had to miss a couple of days > looking after my dau

Re: [Haskell-cafe] Interesting Thread on OO Usefulness (scala mailing list)

2009-05-04 Thread Tillmann Rendel
Hi, Paolo Losi wrote: I'm following an interesting thread on the scala mailing list: http://www.nabble.com/-scala--usefulness-of-OOP-td23268250.html Martin Odersky advocates the OO features of the scala language proposing an interesting problem where the OO approach seams valuable. I would be

[Haskell-cafe] A brief note on n_k patterns and Hackage

2009-05-04 Thread Richard O'Keefe
I never really understood why it was thought to be relevant, but I was challenged to show that n+k patterns occurred in Hackage. Last week I downloaded it. I had to miss a couple of days looking after my daughter, but today I got back to it. Guess what? I found one. Having found one I stopped

[Haskell-cafe] Using Takusen is a real intellectual challenge

2009-05-04 Thread Gü?nther Schmidt
Hi, well I'm *trying* to use Takusen to export from one database into the other. I'm using Takusen for this so that I can guarantee that during the export not a single huge result is assembled (possibly in memory) and then insert in one lump into the second database. Trying to figure out how

[Haskell-cafe] Re: Is Haskell a Good Choice for Web Applications? (ANN: Vocabulink)

2009-05-04 Thread Chris Forno (jekor)
Daniel Carrera writes: > 1) You say that grammar doesn't matter. Well, for some languages it matters > more than others. German, for example, has a very particular word order that > takes some effort to learn, and if you get it wrong people really won't > understand you. In German it's ok if you

Re: [Haskell-cafe] applicative challenge

2009-05-04 Thread Felipe Lessa
On Mon, May 04, 2009 at 10:49:56PM +0100, Conor McBride wrote: > The effect of > > iffy askPresident launchMissiles seekUNResolution > > is to ask the President, then launch the missiles, then lobby the > UN, then decide that the result of seeking a UN resolution is > preferable. > > Remember fol

[Haskell-cafe] Odd error message from ghc --make

2009-05-04 Thread Jeff Heard
I was just running a test that has compiled before just fine, and now I'm getting this rather odd message: EventBusTest.hs:20:9: Couldn't match expected type `Bus a' against inferred type `buster-1.1:App.EventBus.Bus [buster-1.1:App.EventBus.EData

Re: [Haskell-cafe] Foldable for BNFC generated tree

2009-05-04 Thread Deniz Dogan
2009/5/4 Martijn van Steenbergen : > Hi Deniz, > > Deniz Dogan wrote: >> >> So, basically I'd like some sort of folding functionality for these >> data types, without having to hack the lexer/parser myself >> (parameterising the data types), because as I said they're being >> generated by BNFC. > >

Re: [Haskell-cafe] Vector-like data structure

2009-05-04 Thread Don Stewart
Interesting. Thanks for the feedback. You were referring to Stephen Blackheath's BerkeleyDB package? http://hackage.haskell.org/cgi-bin/hackage-scripts/package/BerkeleyDB -- Don gtener: > Thank both of you for your responses. Unfortunately I decided to > switch to Python for this project,

Re: [Haskell-cafe] Vector-like data structure

2009-05-04 Thread Krzysztof Skrzętnicki
Thank both of you for your responses. Unfortunately I decided to switch to Python for this project, as I plan to use BerkeleyDB and Haskell bindings for it are poorly written. Best regards Christopher Skrzętnicki 2009/5/3 Don Stewart : > gtener: >> Hi >> >> I'm looking for a data structure with

Re: [Haskell-cafe] applicative challenge

2009-05-04 Thread Tillmann Rendel
Thomas Hartman wrote: -- Can the function below be tweaked to quit on blank input, provisioned in the applicative style? No. Applicative on its own does not support to decide which action to take based on the result of some previous action. It is therefore not possible to look at the last lin

Re: [Haskell-cafe] applicative challenge

2009-05-04 Thread Conor McBride
Hi Thomas This is "iffy versus miffy", a standard applicative problem. When you use the result of one computation to choose the next computation (e.g., to decide whether you want to keep doing-and-taking), that's when you need yer actual monad. It's the join of a monad that lets you compute comp

Re: [Haskell-cafe] Performance counters

2009-05-04 Thread Thomas DuBuisson
While not entirely handy, do the .prof files not contain enough information on entries into a function? [...@mavlo Test]$ grep addLeaf PingNet.prof addLeaf Network.Pastry.Data.LeafSet 822 1 0.00.0 0.00.0 addLeaf Network.Pastry.Data.L

[Haskell-cafe] applicative challenge

2009-05-04 Thread Thomas Hartman
{-# LANGUAGE NoMonomorphismRestriction #-} import Data.List import Control.Monad import Control.Applicative -- Can the function below be tweaked to quit on blank input, provisioned in the applicative style? -- which function(s) needs to be rewritten to make it so? -- Can you tell/guess which funct

Re: [Haskell-cafe] Performance counters

2009-05-04 Thread Magnus Therning
Andrew Coppin wrote: Don Stewart wrote: andrewcoppin: OK, so I'm pretty sure I'm not the first person to run into this... I've got a fairly large, complex program. It seems to work fine. But now I want to add some counters to measure various things. Trouble is, to do that, I'd have to "i

Re: [Haskell-cafe] HDBC 2.1, UTF8 and Umlauts

2009-05-04 Thread Jeremy Shaw
At Mon, 04 May 2009 11:19:38 -0500, John Goerzen wrote: > but instead just typed the umlaut on the keyboard? > > If so, that won't work directly -- I think. Maybe somebody can correct > me on this, but my hunch is that would save the umlaut as UTF-8 when you > save the .hs file. Then you will g

Re: [Haskell-cafe] Performance counters

2009-05-04 Thread Andrew Coppin
Don Stewart wrote: andrewcoppin: OK, so I'm pretty sure I'm not the first person to run into this... I've got a fairly large, complex program. It seems to work fine. But now I want to add some counters to measure various things. Trouble is, to do that, I'd have to "infect" the entire pro

Re: [Haskell-cafe] traversing a tree using monad.cont

2009-05-04 Thread Anatoly Yakovenko
thanks, that looks promising, but will probably take me a week to understand :) On Sun, May 3, 2009 at 2:40 PM, Ryan Ingram wrote: > Cont with success and failure isn't Cont; it's something else (albeit similar) > > There's a great exposition of using something much like Cont to get > success and

Re: [Haskell-cafe] Performance counters

2009-05-04 Thread Don Stewart
andrewcoppin: > OK, so I'm pretty sure I'm not the first person to run into this... > > I've got a fairly large, complex program. It seems to work fine. But now > I want to add some counters to measure various things. > > Trouble is, to do that, I'd have to "infect" the entire program with > bo

[Haskell-cafe] Performance counters

2009-05-04 Thread Andrew Coppin
OK, so I'm pretty sure I'm not the first person to run into this... I've got a fairly large, complex program. It seems to work fine. But now I want to add some counters to measure various things. Trouble is, to do that, I'd have to "infect" the entire program with boilerplate code to propogat

Re: [Haskell-cafe] Darcs and binary files

2009-05-04 Thread Brent Yorgey
On Mon, May 04, 2009 at 02:52:17PM +0200, Gü?nther Schmidt wrote: > Hi, > > I've gotten used to darcs now, and use it for my project. There is one > quirk though, I also added some rather large binary files, an sqlite > database and an MS Access database to the repository. > > Now whenever I do a

Re: [Haskell-cafe] Interesting Thread on OO Usefulness (scala mailing list)

2009-05-04 Thread Brent Yorgey
On Mon, May 04, 2009 at 03:08:25PM +0200, Martijn van Steenbergen wrote: > Andrew Wagner wrote: >> [quote] >> Here's [a]language to to interpret (where postfix * means tupling): >> Variables: x Integer literals: i Terms: t = Lambda x*. t | Apply t t* >> | Var(x) | Num(i) > > Can someone

Re: [Haskell-cafe] HDBC 2.1, UTF8 and Umlauts

2009-05-04 Thread John Goerzen
Günther Schmidt wrote: > Am 04.05.2009 um 21:07 schrieb John Goerzen: > >> Günther Schmidt wrote: >>> Hi John, >>> >>> I'm afraid so. >>> >>> If it came back as an SqlString "G\252nni" then it propably wouldn't >>> be a problem. >> Can you boil this down to a few-line self-contained test program s

Re: [Haskell-cafe] HDBC 2.1, UTF8 and Umlauts

2009-05-04 Thread John Goerzen
Günther Schmidt wrote: > Hi John, > > I'm afraid so. > > If it came back as an SqlString "G\252nni" then it propably wouldn't > be a problem. Can you boil this down to a few-line self-contained test program so I can try it myself? I do have test cases for Unicode stuff and they are all passin

Re[2]: [Haskell-cafe] Interesting Thread on OO Usefulness (scala mailing list)

2009-05-04 Thread Bulat Ziganshin
Hello Mads, Monday, May 4, 2009, 7:01:16 PM, you wrote: >> i know two problems in Haskell/GHC that require OO-loke features - >> extensible exceptions and GUI widget types hierarchy > Yes, type hierarchies require OO. > But, do we really need to represent different widget-types in a > hierarchy

Re: [Haskell-cafe] HDBC 2.1, UTF8 and Umlauts

2009-05-04 Thread John Goerzen
Günther Schmidt wrote: > Hi John, > > what I just noticed is that *all* strings come back as SqlByteStrings. That's normal, and pretty much irrelevant, since fromSql takes care of it. It's documented, even: the SqlByteString is assumed to be in UTF-8, and is decoded when converted to a String.

[Haskell-cafe] Re: Is Haskell a Good Choice for Web Applications? (ANN: Vocabulink)

2009-05-04 Thread Simon Michael
A very interesting read, thank you Chris! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: When is it OK to create a new mailing list?

2009-05-04 Thread Maurício
>> Would this not fit well in the wxHaskell mailing list? That list is not very >> high traffic and there is an obvious overlap in the target audience. > This was my thought as well. Adding another list is considerable > overhead, and keeping it on the wxHaskell list has the benefits of > no-admin

Re: [Haskell-cafe] HDBC 2.1, UTF8 and Umlauts

2009-05-04 Thread Duncan Coutts
On Mon, 2009-05-04 at 11:19 -0500, John Goerzen wrote: > Guenther Schmidt wrote: > > Hi John, > > > > thanks for taking the time. It actually is \252 that turned into > > something else because of my email client, damn the thing. > > OK, perhaps we have some confusion here. > > Are you saying t

Re: [Haskell-cafe] HDBC 2.1, UTF8 and Umlauts

2009-05-04 Thread John Goerzen
Guenther Schmidt wrote: > Hi John, > > thanks for taking the time. It actually is \252 that turned into > something else because of my email client, damn the thing. OK, perhaps we have some confusion here. Are you saying that you entered the Unicode characters directly into your Haskell source

Re: [Haskell-cafe] Is Haskell a Good Choice for Web Applications? (ANN: Vocabulink)

2009-05-04 Thread Justin Bailey
Thanks for sharing your code and experience. Very interesting and a good example of how to put the libraries together to build a real app. On Mon, May 4, 2009 at 12:45 AM, Chris Forno wrote: > I decided to find out for myself. You can find the results at > http://jekor.com/article/is-haskell-a-go

Re: [Haskell-cafe] Interesting Thread on OO Usefulness (scala mailing list)

2009-05-04 Thread Mads Lindstrøm
Hi Bulat Ziganshin wrote: > Hello Paolo, > > Monday, May 4, 2009, 2:05:44 PM, you wrote: > > > Martin Odersky advocates the OO features of the scala language > > proposing an interesting problem where the OO approach seams > > valuable. > > i know two problems in Haskell/GHC that require OO-lo

Re: [Haskell-cafe] HDBC 2.1, UTF8 and Umlauts

2009-05-04 Thread John Goerzen
GüŸnther Schmidt wrote: > Hi guys, > > for some reason, any way I try, all the Umlauts get garbled with HDBC 2.1. > HDBC 1.16 worked fine with any backend (ODBC, Sqlite3, ... what have you). > > Anybody else had similar problems and knows how to solve this? You need to be more specific, but it i

Re: [Haskell-cafe] Estimating the time to garbage collect

2009-05-04 Thread Duncan Coutts
On Mon, 2009-05-04 at 15:05 +0100, Neil Davies wrote: > Duncan > > That was my first thought - but what I'm looking for is some > confirmation from those who know better that treating the GC as > 'statistical source' is a valid hypothesis. If the thing is 'random' > that's fine - if its timi

Re: [Haskell-cafe] Estimating the time to garbage collect

2009-05-04 Thread Neil Davies
Duncan That was my first thought - but what I'm looking for is some confirmation from those who know better that treating the GC as 'statistical source' is a valid hypothesis. If the thing is 'random' that's fine - if its timing is non-deterministic, that's not fine. So GC experts are the

Re: [Haskell-cafe] When is it OK to create a new mailing list?

2009-05-04 Thread Gwern Branwen
On Mon, May 4, 2009 at 8:37 AM, Daniel Carrera wrote: > Would this not fit well in the wxHaskell mailing list? That list is not very > high traffic and there is an obvious overlap in the target audience. > > Daniel. This was my thought as well. Adding another list is considerable overhead, and ke

Re: [Haskell-cafe] gcd

2009-05-04 Thread Steve
Thanks for all the replies, it looks like there is a lot of support for having gcd 0 0 = 0. I've since discovered that there was a similar discussion in 2001, where the majority supported gcd 0 0 = 0, but the suggested change was never implemented. http://www.haskell.org/pipermail/haskell/2001-Dec

Re: [Haskell-cafe] Interesting Thread on OO Usefulness (scala mailing list)

2009-05-04 Thread Martijn van Steenbergen
Andrew Wagner wrote: [quote] Here's [a]language to to interpret (where postfix * means tupling): Variables: x Integer literals: i Terms: t = Lambda x*. t | Apply t t* | Var(x) | Num(i) Can someone explain to me how I should read this? It supposedly explains what the postfix

Re: [Haskell-cafe] Interesting Thread on OO Usefulness (scala mailing list)

2009-05-04 Thread Luke Palmer
ML functors seem the ideal tool for this task. People have shown how you can emulate them with typeclasses, but it won't necessarily be pretty... On Mon, May 4, 2009 at 4:05 AM, Paolo Losi wrote: > Hi all, > > I'm following an interesting thread on the scala mailing list: > > http://www.nabble.

[Haskell-cafe] Darcs and binary files

2009-05-04 Thread Gü?nther Schmidt
Hi, I've gotten used to darcs now, and use it for my project. There is one quirk though, I also added some rather large binary files, an sqlite database and an MS Access database to the repository. Now whenever I do a push from a branch into the main trunk the system runs out of memory. Gu

Re: [Haskell-cafe] When is it OK to create a new mailing list?

2009-05-04 Thread Daniel Carrera
Duncan Coutts wrote: I wanted a mailing list for my project WxGeneric and I am wondering when it is OK to do so? How big must the potential audience be? Is there any kind of etiquette or guidelines? ... Yes, I would recommend for smaller project-specific mailing lists that you take advantage o

[Haskell-cafe] HDBC 2.1, UTF8 and Umlauts

2009-05-04 Thread GüŸnther Schmidt
Hi guys, for some reason, any way I try, all the Umlauts get garbled with HDBC 2.1. HDBC 1.16 worked fine with any backend (ODBC, Sqlite3, ... what have you). Anybody else had similar problems and knows how to solve this? Günther ___ Haskell-Cafe mai

Re: [Haskell-cafe] Estimating the time to garbage collect

2009-05-04 Thread Duncan Coutts
On Fri, 2009-05-01 at 09:14 +0100, Neil Davies wrote: > Hi > > With the discussion on threads and priority, and given that (in > Stats.c) there are lots of useful pieces of information that the run > time system is collecting, some of which is already visible (like the > total amount of memo

Re: [Haskell-cafe] Interesting Thread on OO Usefulness (scala mailing list)

2009-05-04 Thread Andrew Wagner
This sounds like a really interesting question. To save some people weeding through the thread and Jon Harrop's usual trolling garbage, here's a description of the problem: [quote] Here's [a]language to to interpret (where postfix * means tupling): Variables: x Integer literals: i Terms: t = Lamb

Re: [Haskell-cafe] When is it OK to create a new mailing list?

2009-05-04 Thread Duncan Coutts
On Mon, 2009-05-04 at 12:51 +0200, Wolfgang Jeltsch wrote: > Am Samstag, 2. Mai 2009 14:11 schrieb Mads Lindstrøm: > > Hi > > > > I wanted a mailing list for my project WxGeneric and I am wondering when > > it is OK to do so? How big must the potential audience be? Is there any > > kind of etiquett

Re: [Haskell-cafe] Interesting Thread on OO Usefulness (scala mailing list)

2009-05-04 Thread Bulat Ziganshin
Hello Paolo, Monday, May 4, 2009, 2:05:44 PM, you wrote: > Martin Odersky advocates the OO features of the scala language > proposing an interesting problem where the OO approach seams > valuable. i know two problems in Haskell/GHC that require OO-loke features - extensible exceptions and GUI wi

Re: [Haskell-cafe] Decoupling OpenAL/ALUT packages from OpenGL

2009-05-04 Thread David Duke
Sven, Decoupling basic primitives for geometric modelling from OpenGL would be useful. For our work on data visualization (www.comp.leeds.ac.uk/funvis/) we introduced our own coordinate primitives for 2D and 3D (Coord2D and Coord3D), along with a simple typeclass for vector-like operations

Re: [Haskell-cafe] Research in functional programming

2009-05-04 Thread Wolfgang Jeltsch
Am Sonntag, 3. Mai 2009 23:13 schrieb Louis Wasserman: > Where might I find or submit a paper on functional data structures? > Examples I've found so far include ICFP > and the JFP , > but Google hasn't fo

Re: [Haskell-cafe] Research in functional programming

2009-05-04 Thread Wolfgang Jeltsch
Am Montag, 4. Mai 2009 11:32 schrieb Malcolm Wallace: > TFP - Trends in Functional Programming Deadline on sunday. Best wishes, Wolfgang ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] When is it OK to create a new mailing list?

2009-05-04 Thread Wolfgang Jeltsch
Am Samstag, 2. Mai 2009 14:11 schrieb Mads Lindstrøm: > Hi > > I wanted a mailing list for my project WxGeneric and I am wondering when > it is OK to do so? How big must the potential audience be? Is there any > kind of etiquette or guidelines? > > Here http://haskell.org/mailman/admin it says that

[Haskell-cafe] Thread on scala ml: Usefulness of OOP

2009-05-04 Thread Paolo Losi
Hi all, I'd like to mention an interesting thread on the scala mailing list about usefulness of OOP. http://www.nabble.com/-scala--usefulness-of-OOP-td23268250.html Martin Odersky, scala creator, advocates the use of OOP using an interesting toy problem. I would be very interested about the hask

[Haskell-cafe] Interesting Thread on OO Usefulness (scala mailing list)

2009-05-04 Thread Paolo Losi
Hi all, I'm following an interesting thread on the scala mailing list: http://www.nabble.com/-scala--usefulness-of-OOP-td23268250.html Martin Odersky advocates the OO features of the scala language proposing an interesting problem where the OO approach seams valuable. I would be very much inte

Re: [Haskell-cafe] Is Haskell a Good Choice for Web Applications? (ANN: Vocabulink)

2009-05-04 Thread Daniel Carrera
Hi Chris, Thanks. This should be interesting. I currently work as a web developer and I've been wondering how easy or hard it would be to develop web applications with Haskell. So I'll be interested in reading our article. On a separate topic, I also took a glance at vocabulink.com. I'm inte

Re: [Haskell-cafe] instance Monad (Except err)

2009-05-04 Thread Neil Brown
Martijn van Steenbergen wrote: Hello, Mr. McBride and mr. Paterson define in their Applicative paper: data Except e a = OK a | Failed e instance Monoid e => Applicative (Except e) where ... Sometimes I'd still like to use >>= on Excepts but this "feels" wrong somehow, because it doesn't use

Re: [Haskell-cafe] Research in functional programming

2009-05-04 Thread Malcolm Wallace
Louis Wasserman wrote: > Where might I find or submit a paper on functional data structures? > Examples I've found so far include ICFP > and the JFP > , but > Google hasn't found me anything else. See a

Re: [Haskell-cafe] instance Monad (Except err)

2009-05-04 Thread Tony Morris
Martijn van Steenbergen wrote: > Hello, > > Mr. McBride and mr. Paterson define in their Applicative paper: > >> data Except e a = OK a | Failed e >> instance Monoid e => Applicative (Except e) where ... > > Sometimes I'd still like to use >>= on Excepts but this "feels" wrong > somehow, because it

Re: [Haskell-cafe] Getting WriterT log lazily

2009-05-04 Thread Magnus Therning
Martijn van Steenbergen wrote: Magnus Therning wrote: Without the `seq` the call to sleep will simply be skipped (is there an easier way to force evaluation there?). Without `unsafePerformIO` all the sleeping is done up front, and all numbers are print at once at the end. The goal is of course

[Haskell-cafe] instance Monad (Except err)

2009-05-04 Thread Martijn van Steenbergen
Hello, Mr. McBride and mr. Paterson define in their Applicative paper: data Except e a = OK a | Failed e instance Monoid e => Applicative (Except e) where ... Sometimes I'd still like to use >>= on Excepts but this "feels" wrong somehow, because it doesn't use monoids nicely like the Applica

[Haskell-cafe] *system*-time timeout?

2009-05-04 Thread brian
System.Timeout.timeout is OK for wall clock time, but can I limit the amount of system time an IO action can take? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Research in functional programming

2009-05-04 Thread Neil Mitchell
Hi http://www.haskell.org/haskell-symposium/2009/ And you've got til Friday! Thanks, Neil On Sun, May 3, 2009 at 10:13 PM, Louis Wasserman wrote: > Where might I find or submit a paper on functional data structures? > Examples I've found so far include ICFP and the JFP, but Google hasn't found

[Haskell-cafe] Re: StateT IO Action on `onKeyPress`

2009-05-04 Thread Andy Stewart
Hi Ryan, Ryan Ingram writes: > Hi Andy. > > The GTK bindings use IO for their callbacks, not any custom monad like > your WindowListT. > > I suggest, instead of StateT s IO a, you use ReaderT (IORef s) IO a: > > putR :: s -> ReaderT (IORef s) IO () > putR s = do > r <- ask > liftIO $ wri

Re: [Haskell-cafe] Foldable for BNFC generated tree

2009-05-04 Thread Martijn van Steenbergen
Hi Deniz, Deniz Dogan wrote: So, basically I'd like some sort of folding functionality for these data types, without having to hack the lexer/parser myself (parameterising the data types), because as I said they're being generated by BNFC. What exactly do you mean by folding functionality? Fol

[Haskell-cafe] Is Haskell a Good Choice for Web Applications? (ANN: Vocabulink)

2009-05-04 Thread Chris Forno
I decided to find out for myself. You can find the results at http://jekor.com/article/is-haskell-a-good-choice-for-web-applications Included is the source code for the web application powering http://www.vocabulink.com/ The source is roughly 2,000 lines of Haskell, along with some SQL and JavaSc

Re: [Haskell-cafe] Getting WriterT log lazily

2009-05-04 Thread Martijn van Steenbergen
Magnus Therning wrote: Without the `seq` the call to sleep will simply be skipped (is there an easier way to force evaluation there?). Without `unsafePerformIO` all the sleeping is done up front, and all numbers are print at once at the end. The goal is of course to use code along the same shap