[Haskell-cafe] getting fulling qualified names of types from hint/ghc api

2011-01-19 Thread Pasqualino Titto Assini
Hi, I am using hint's Language.Haskell.Interpreter.typeOf function to dynamically get the type of a haskell expression but, unfortunately for my purposes, I see that it returns unqualified names (I see in Hint.Conversions that it uses the GHC function GHC.getPrintUnqual). Is there any function

Re: [Haskell-cafe] class-instance

2011-01-19 Thread Ryan Ingram
I don't think that's exactly what you want, though. name (2::Int) crashes your program. I think you really want a data type. data Person a b = P a b pid :: Person a b - a pid (P a _) = a pname :: Person a b - b pname (P _ b) = b Now, what it looks like you want is some kind of extensible

Re: [Haskell-cafe] Happstack events and web page refreshing

2011-01-19 Thread Bas van Dijk
On 17 January 2011 21:50, Jeremy Shaw jer...@n-heptane.com wrote: On Jan 17, 2011, at 2:19 PM, Corentin Dupont wrote: Indeed, I tried with META HTTP-EQUIV=Refresh CONTENT=n ? and it's unusable. It make blink the page, ungrey the stop button for a second and make the fields loose the focus

[Haskell-cafe] Problems installing the haskell platform

2011-01-19 Thread Henry Laxen
Dear Group, Greetings. I've been using haskell for about a year now, though I will readily admit I still don't really know what I am doing when I get error messages. Today I decided to reset my haskell environment from scratch, avoiding the debian packages and going straight to the source.

Re: [Haskell-cafe] Happstack events and web page refreshing

2011-01-19 Thread Corentin Dupont
Thanks. There seems to be several technologies to realize this push or polling. Is what you explained feasible on the user's side of happstack-server (I mean, if I can do it myself)? If I take an empty MVar in my ServerPartTs, which are read over client's request, I think that nothing will be

Re: [Haskell-cafe] Happstack events and web page refreshing

2011-01-19 Thread Vo Minh Thu
Hi, I've not really followed the thread, but on the client side, for long-polling, you issue an XMLHttpRequest that will receive an answer from the server only when the server has something to push to the client (maybe done with a thread waiting on an MVar). XHR is asynchronous as you have to

Re: [Haskell-cafe] Problems installing the haskell platform

2011-01-19 Thread Joachim Breitner
Hi, Am Mittwoch, den 19.01.2011, 13:52 + schrieb Henry Laxen: I know some of you will say use the debian packages. Well I did that, but when I tried to install snap, which is not included in the debian packages, I wound up with conflicting dependencies, and could not find a way out. I

Re: [Haskell-cafe] Happstack events and web page refreshing

2011-01-19 Thread Bas van Dijk
On 19 January 2011 15:02, Corentin Dupont corentin.dup...@gmail.com wrote: Is what you explained feasible on the user's side of happstack-server (I mean, if I can do it myself)? Yes, you can do it yourself. If I take an empty MVar in my ServerPartTs, which are read over client's request, I

Re: [Haskell-cafe] web-routes and forms

2011-01-19 Thread Corentin Dupont
Thanks Jeremy. I had it to work now ;) Corentin On Tue, Jan 18, 2011 at 6:01 PM, Jeremy Shaw jer...@n-heptane.com wrote: Hello, trhsx will be installed in ~/.cabal/bin, so you will need to add that to your PATH. In order to use the demo code I provided you would need the latest happstack

[Haskell-cafe] pla...@community.haskell.org and Mailman Images

2011-01-19 Thread Jon Kristensen
Just two small comments: The e-mail address pla...@community.haskell.org mentioned at http://planet.haskell.org/ bounces (connect to community.haskell.org[72.249.126.23]: Connection timed out). Also, registering on this mailing list to report the problem, I realized that the mailman images

[Haskell-cafe] Adding a builder to the bytestring package?

2011-01-19 Thread John Millikin
Most people who work with binary data have had to construct bytestrings at some point. The most common solution is to use a Builder, a monoid representing how to construct a bytestring. There are currently three packages (that I know of) which include builder implementations: binary, cereal, and

Re: [Haskell-cafe] Problems installing the haskell platform

2011-01-19 Thread Henry Laxen
Dear Joachim, Well, I got away with a lot of stuff, but as I said, when I tried to install snap via cabal-install, I could not break through the dependency jungle. I believe the stumbling block was trying to install hint. All of the debian packages installed just fine, but there is no

[Haskell-cafe] Community.haskell.org is down

2011-01-19 Thread Neil Mitchell
http://www.downforeveryoneorjustme.com/http://community.haskell.org Currently community is down for me. I remember some infrastructure/website strike team was set up, but I couldn't find where to get in contact with them? Thanks, Neil ___ Haskell-Cafe

Re: [Haskell-cafe] Community.haskell.org is down

2011-01-19 Thread Antoine Latter
CCing commit...@haskell.org Here's the wiki page: http://haskell.org/haskellwiki/Haskell.org_committee And a neat twitter account, which can be viewed as RSS: http://twitter.com/#!/haskellorg Antoine On Wed, Jan 19, 2011 at 1:07 PM, Neil Mitchell ndmitch...@gmail.com wrote:

Re: [Haskell-cafe] Adding a builder to the bytestring package?

2011-01-19 Thread Johan Tibell
On Wed, Jan 19, 2011 at 6:51 PM, John Millikin jmilli...@gmail.com wrote: Most people who work with binary data have had to construct bytestrings at some point. The most common solution is to use a Builder, a monoid representing how to construct a bytestring. There are currently three packages

Re: [Haskell-cafe] Adding a builder to the bytestring package?

2011-01-19 Thread Michael Snoyman
On Wed, Jan 19, 2011 at 9:32 PM, Johan Tibell johan.tib...@gmail.com wrote: On Wed, Jan 19, 2011 at 6:51 PM, John Millikin jmilli...@gmail.com wrote: Most people who work with binary data have had to construct bytestrings at some point. The most common solution is to use a Builder, a monoid

Re: [Haskell-cafe] Adding a builder to the bytestring package?

2011-01-19 Thread Johan Tibell
On Wed, Jan 19, 2011 at 8:37 PM, Michael Snoyman mich...@snoyman.com wrote: Isn't Simon Meier working on migrating his code from blaze-builder into binary? So I heard (although not directly from Simon). I think it would be nice to port the blaze-builder implementation to binary, but to keep

Re: [Haskell-cafe] Proposal: Applicative = Monad: Call for consensus

2011-01-19 Thread Conor McBride
Hi Tyson (So OT, I'm switching to cafe.) On 19 Jan 2011, at 18:24, Tyson Whitehead wrote: On January 17, 2011 16:20:22 Conor McBride wrote: Ahem : ) The unfortunate pain you pay for this additional power is manually having to specify the application ($ and *) and merging (join). If the

Re: [Haskell-cafe] Adding a builder to the bytestring package?

2011-01-19 Thread John Millikin
On Wed, Jan 19, 2011 at 12:04, Johan Tibell johan.tib...@gmail.com wrote: On Wed, Jan 19, 2011 at 8:37 PM, Michael Snoyman mich...@snoyman.com wrote: Isn't Simon Meier working on migrating his code from blaze-builder into binary? So I heard (although not directly from Simon). I think it would

Re: [Haskell-cafe] Adding a builder to the bytestring package?

2011-01-19 Thread Michael Snoyman
On Wed, Jan 19, 2011 at 10:04 PM, Johan Tibell johan.tib...@gmail.com wrote: On Wed, Jan 19, 2011 at 8:37 PM, Michael Snoyman mich...@snoyman.com wrote: Isn't Simon Meier working on migrating his code from blaze-builder into binary? So I heard (although not directly from Simon). I think it

Re: [Haskell-cafe] Adding a builder to the bytestring package?

2011-01-19 Thread Johan Tibell
On Wed, Jan 19, 2011 at 9:51 PM, John Millikin jmilli...@gmail.com wrote: Can any of the blaze-builder optimizations be translated to the Text builder? When I benchmark it against binary and cereal, blaze-builder is approximately 2-3 times faster for most use cases. Yes, but I haven't had time

Re: [Haskell-cafe] Adding a builder to the bytestring package?

2011-01-19 Thread Johan Tibell
On Wed, Jan 19, 2011 at 10:30 PM, Michael Snoyman mich...@snoyman.com wrote: What's the advantage to moving in into binary as opposed to bytestring? To test that the implementation can indeed be ported to that interface. We could of course skip that step if we want to. Johan

[Haskell-cafe] source line annotations

2011-01-19 Thread Evan Laforge
One of the first things I did when starting a larger haskell project was to write a preprocessor that would replace certain tokens with (token_srcpos (filename, func_name, lineno)) and then write x and x_srcpos versions of the various 'throw' and logging functions. This is extremely handy to

Re: [Haskell-cafe] Adding a builder to the bytestring package?

2011-01-19 Thread John Millikin
On Wed, Jan 19, 2011 at 14:06, Johan Tibell johan.tib...@gmail.com wrote: On Wed, Jan 19, 2011 at 10:30 PM, Michael Snoyman mich...@snoyman.com wrote: What's the advantage to moving in into binary as opposed to bytestring? To test that the implementation can indeed be ported to that

Re: [Haskell-cafe] Adding a builder to the bytestring package?

2011-01-19 Thread Johan Tibell
On Thu, Jan 20, 2011 at 12:16 AM, John Millikin jmilli...@gmail.com wrote: blaze-builder already implements the binary builder interface, minus the putWord* functions. I think those would be trivial to reimplement on top of Write. Since it sounds like everyone agrees with / has already

Re: [Haskell-cafe] source line annotations

2011-01-19 Thread Max Bolingbroke
On 19 January 2011 22:43, Evan Laforge qdun...@gmail.com wrote:  Reasons why I don't actually want this after all? Are you aware of the magic assert function? http://hackage.haskell.org/packages/archive/base/latest/doc/html/Control-Exception-Base.html#v:assert The compiler spots it and

Re: [Haskell-cafe] source line annotations

2011-01-19 Thread Evan Laforge
Now your consumers can write: getSourceLoc assert :: String And you will have a value that describes where you are. You can then use this to implement logging, throw errors etc. The annoying part is that you have to explicitly pass in assert from the call site to make sure that you get the

Re: [Haskell-cafe] Building lambdabot

2011-01-19 Thread Gwern Branwen
On Tue, Jan 18, 2011 at 3:41 PM, Max Bolingbroke batterseapo...@hotmail.com wrote: That sounds like a good thing to do. Also, oo you know if there's any reason that the most recent lambdabot is not pushed to Hackage? That might make things even easier for others who wish to install it. It

[Haskell-cafe] Haskell Weekly News: Issue 165 - January 19, 2011

2011-01-19 Thread Daniel Santa Cruz
Welcome to issue 165 of the HWN, a newsletter covering developments in the [1]Haskell community. This release covers the week of January 9 to 15, 2011. Announcements Brent Yorgey [2]announced the release of issue 17 of The Monad.Reader, containing the following three articles:

[Haskell-cafe] Call for Submissions: Special Poetry and Fiction Edition of the Monad.Reader

2011-01-19 Thread Brent Yorgey
Submissions are now being accepted for a special POETRY AND FICTION edition of the Monad.Reader. Poems about Haskell, short stories about Haskell, poems about poems about Haskell, elaborate monad tutorial allegories, Haskell/Dinosaur Comics crossovers: all fair game! If you want a bit of

[Haskell-cafe] Haskell time line?

2011-01-19 Thread michael rice
The Haskell language is some twenty years old. Is there a time line for what features were in the language's initial release and what has been added along the way? Michael ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Haskell time line?

2011-01-19 Thread Brent Yorgey
On Wed, Jan 19, 2011 at 06:49:49PM -0800, michael rice wrote: The Haskell language is some twenty years old. Is there a time line for what features were in the language's initial release and what has been added along the way? See A History of Haskell: Being Lazy with Class by Hudak, Hughes,

Re: [Haskell-cafe] Haskell time line?

2011-01-19 Thread michael rice
I found a copy. Thanks! Michael --- On Wed, 1/19/11, Brent Yorgey byor...@seas.upenn.edu wrote: From: Brent Yorgey byor...@seas.upenn.edu Subject: Re: [Haskell-cafe] Haskell time line? To: Haskell Cafe haskell-cafe@haskell.org Date: Wednesday, January 19, 2011, 10:03 PM On Wed, Jan 19, 2011 at

[Haskell-cafe] Wondering about networking programming in Haskell.

2011-01-19 Thread Magicloud Magiclouds
Hi, Originally, my idea for networking programming is like: read some bytes, judge if this is enough for a packet (defined in certain protocol), if not, read more until the packet is complete, then parse it into a message. Now we have lazy in Haskell. Can I do it as: buffer - hGetContents

[Haskell-cafe] Formal Program verification in Meta-Haskell

2011-01-19 Thread Alexander McPhail
Hi, I have no understanding of template haskell and thus this message is uninformed speculation. Would it not be possible to write a function verifier in TH that, unlike QuickCheck which provides bounds on a function being probably approximately correct, is given a list over properties which are

Re: [Haskell-cafe] A question about monad based on http://en.wikipedia.org/wiki/Monad_(category_theory)

2011-01-19 Thread wren ng thornton
On 1/17/11 10:46 PM, C K Kashyap wrote: Hi, I was going through http://en.wikipedia.org/wiki/Monad_(category_theory) - under Formal Definition I notice that monad is a Functor T:C - C My question is - when we think of Maybe as a functor T:C - C should we think that C here refers to

Re: [Haskell-cafe] class-instance

2011-01-19 Thread Patrick Browne
On 19/01/2011 10:41, Ryan Ingram wrote: It's still not really clear what you are trying to do. I am trying to see what how this requirement can be represented using just the normal instance-implements-class relation for a comparison with a specification language approach. If there is no simple