Re: [Haskell-cafe] How does one create an input handle bound to a string instead of a file?

2013-02-28 Thread Ganesh Sittampalam
Hi, On 27/02/2013 20:38, John D. Ramsdell wrote: How does one create a value of type System.IO.Handle for reading that takes its input from a string instead of a file? I'm looking for the equivalent of java.io.StringReader in Java. Thanks in advance.

Re: [Haskell-cafe] How does one create an input handle bound to a string instead of a file?

2013-02-28 Thread Ganesh Sittampalam
to implement a duplicate parser that implements Read. At least S-expression parsing is easy. John On Thu, Feb 28, 2013 at 3:02 AM, Ganesh Sittampalam gan...@earth.li wrote: Hi, On 27/02/2013 20:38, John D. Ramsdell wrote: How does one create a value of type System.IO.Handle for reading

Re: [Haskell-cafe] Heads up: planned removal of String instances from HTTP package

2013-01-30 Thread Ganesh Sittampalam
to really clean up :) Obviously I'm saying this from a non-http-user point of view, maybe if I had some code in production affected by this, my suggestion would have been different :P Regards, A. On 30 January 2013 07:00, Ganesh Sittampalam gan...@earth.li mailto:gan...@earth.li wrote

[Haskell-cafe] Heads up: planned removal of String instances from HTTP package

2013-01-29 Thread Ganesh Sittampalam
Hi, tl;dr: I'm planning on removing the String instances from the HTTP package. This is likely to break code. Obviously it will involve a major version bump. The basic reason is that this instance is rather broken in itself. A String ought to represent Unicode data, but the HTTP wire format is

Re: [Haskell-cafe] Heads up: planned removal of String instances from HTTP package

2013-01-29 Thread Ganesh Sittampalam
On 29/01/2013 22:46, Johan Tibell wrote: On Tue, Jan 29, 2013 at 2:15 PM, Ganesh Sittampalam gan...@earth.li wrote: tl;dr: I'm planning on removing the String instances from the HTTP package. This is likely to break code. Obviously it will involve a major version bump. I think it's

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-17 Thread Ganesh Sittampalam
On 09/11/2012 18:35, Clark Gaebel wrote: I think we just use dependencies different things. This is a problem inherent in cabal. When I (and others) specify a dependency, I'm saying My package will work with these packages. I promise. When you (and others) specify a dependency, you're

Re: [Haskell-cafe] Destructive updates to plain ADTs

2012-09-09 Thread Ganesh Sittampalam
On 09/09/2012 11:03, Milan Straka wrote: I was hoping for some Addr# trick or something like that. If I understand the GHC runtime correctly, rewriting a pointer in an ADT should not break any garbage collecting and similar. Don't you need to worry about having something in the old generation

Re: [Haskell-cafe] haskell.org is so fragile

2012-07-12 Thread Ganesh Sittampalam
Hi, On 12/07/2012 13:06, Takayuki Muranushi wrote: Today I have observed that hackage.haskell.org/ timeout twice (in the noon and in the evening.) What is the problem? Is it that haskell users have increased so that haskell.org is overloaded? That's very good news. I am eager to donate

Re: [Haskell-cafe] Fwd: Now Accepting Applications for Mentoring Organizations for GSoC 2012

2012-03-01 Thread Ganesh Sittampalam
FYI, Edward Kmett has volunteered to do it again. On 28/02/2012 16:23, Johan Tibell wrote: Hi all, Anyone interested in acting as an admin for haskell.org http://haskell.org this year? I'm afraid I won't have time. It's not that much work (filling in some information, sending out some

Re: [Haskell-cafe] Fwd: Now Accepting Applications for Mentoring Organizations for GSoC 2012

2012-03-01 Thread Ganesh Sittampalam
On 01/03/2012 21:37, Johan Tibell wrote: On Thu, Mar 1, 2012 at 12:54 PM, Ganesh Sittampalam gan...@earth.li mailto:gan...@earth.li wrote: FYI, Edward Kmett has volunteered to do it again. That's great since he's the most experienced GSoC admin we have. :) There's still room

Re: [Haskell-cafe] Why were unfailable patterns removed and fail added to Monad?

2012-01-21 Thread Ganesh Sittampalam
On 20/01/2012 03:23, Edward Z. Yang wrote: Oh, I'm sorry! On a closer reading of your message, you're asking not only asking why 'fail' was added to Monad, but why unfailable patterns were removed. Well, from the message linked: In Haskell 1.4 g would not be in MonadZero because (a,b)

Re: [Haskell-cafe] [Haskell] Proposal to incorporate Haskell.org

2011-12-16 Thread Ganesh Sittampalam
Hi, As mentioned in the committee's annual report (http://haskellorg.wordpress.com/2011/10/26/first-year-report/), our attempt to join SFC has stalled because they don't have the capacity to accept new projects at the moment. We therefore applied to join SPI (http://www.spi-inc.org/), and they

Re: [Haskell-cafe] [Haskell] Proposal to incorporate Haskell.org

2011-12-16 Thread Ganesh Sittampalam
BTW as with the Don's original message about incorporating, I distributed this widely to increase awareness, but please restrict any feedback to haskell-cafe@ and committee@. Sorry for the noise! Ganesh On 16/12/2011 09:08, Ganesh Sittampalam wrote: Hi, As mentioned in the committee's

Re: [Haskell-cafe] [Haskell] Proposal to incorporate Haskell.org

2011-12-16 Thread Ganesh Sittampalam
On 16/12/2011 10:59, Giovanni Tirloni wrote: On Fri, Dec 16, 2011 at 7:08 AM, Ganesh Sittampalam gan...@earth.li mailto:gan...@earth.li wrote: Q: If an umbrella non-profit organisation The Haskell Foundation was created, would haskell.org http://haskell.org be able to join

Re: [Haskell-cafe] [Haskell] Proposal to incorporate Haskell.org

2011-12-16 Thread Ganesh Sittampalam
On 16/12/2011 13:21, Thomas Schilling wrote: On 16 December 2011 11:10, Ganesh Sittampalam gan...@earth.li wrote: On 16/12/2011 10:59, Giovanni Tirloni wrote: Would it be a too ambitious goal to create the Haskell Foundation at this moment? It would be a lot of administrative effort

Re: [Haskell-cafe] Exception for NaN

2011-05-12 Thread Ganesh Sittampalam
On 12/05/2011 19:41, Nick Bowler wrote: On 2011-05-12 21:14 +0400, Grigory Sarnitskiy wrote: I don't want NaN to propagate, it is merely stupid, it should be terminated. NaN propagation is not stupid. Frequently, components of a computation that end up being NaN turn out to be irrelevant

Re: [Haskell-cafe] Proposal to incorporate Haskell.org

2011-05-11 Thread Ganesh Sittampalam
On 11/05/2011 06:08, Antoine Latter wrote: Which assets would move over to the SFC? The domain name? Any sort of hosting could then be leased by the SFC to whomever is doing this now. I'm a bit fuzzy here. Everything but the domain name, so that the Haskell community as a whole can retain the

Re: [Haskell-cafe] Proposal to incorporate Haskell.org

2011-05-11 Thread Ganesh Sittampalam
On 11/05/2011 10:33, Yitzchak Gale wrote: Don Stewart wrote: The haskell.org committee... has decided to incorporate haskell.org as a legal entity. This email outlines our recommendation, and seeks input from the community on this decision. Thanks, good news! And thanks for posting to

Re: [Haskell-cafe] A small Darcs anomoly

2011-04-27 Thread Ganesh Sittampalam
On 26/04/2011 12:17, Malcolm Wallace wrote: On 25 Apr 2011, at 11:13, Andrew Coppin wrote: On 24/04/2011 06:33 PM, Jason Dagit wrote: This is because of a deliberate choice that was made by David Roundy. In darcs, you never have multiple branches within a single darcs repository

Re: [Haskell-cafe] Type families again

2010-12-03 Thread Ganesh Sittampalam
On Thu, 2 Dec 2010, Robert Greayer wrote: On Thu, Dec 2, 2010 at 4:39 PM, Antoine Latter aslat...@gmail.com wrote: On Thu, Dec 2, 2010 at 3:29 PM, Andrew Coppin andrewcop...@btinternet.com wrote: What we /can't/ do is define a polymorphic map function. One might try to do something like  

[Haskell-cafe] HTTP 4000.1.0 release

2010-11-09 Thread Ganesh Sittampalam
Hi, I've just released HTTP 4000.1.0 to hackage: - Fixed a bug that caused infinite loops for some URLs on some platforms (whether the URL was a trigger is probably related to the size of the returned data, and the affected platforms. Based on a patch by Daniel Wagner. - This is

Re: [Haskell-cafe] Bug in HTTP (bad internal error handling)

2010-11-03 Thread Ganesh Sittampalam
On Wed, 3 Nov 2010, Simon Marlow wrote: On 29/10/2010 23:24, Ganesh Sittampalam wrote: 4000.0.10 should fix the reported issue with fail and Either, and bumps the base dep to build with GHC 7.0 That's great. Any chance you could also look at this one, which appears to be a pretty serious

Re: [Haskell-cafe] Bug in HTTP (bad internal error handling)

2010-10-29 Thread Ganesh Sittampalam
On Fri, 22 Oct 2010, Sigbjorn Finne wrote: On Fri, Oct 22, 2010 at 9:35 AM, Sittampalam, Ganesh ganesh.sittampa...@credit-suisse.com wrote: libraries@, what's the right way to proceed? Can I make a Debian-style non-maintainer upload with minimal changes to fix urgent issues like these?

Re: [Haskell-cafe] Bug in HTTP (bad internal error handling)

2010-10-24 Thread Ganesh Sittampalam
On Sun, 24 Oct 2010, Bit Connor wrote: On Sat, Oct 23, 2010 at 8:49 PM, Ganesh Sittampalam gan...@earth.li wrote: I'm just looking at fixing this so I can make an upload as discussed with Sigbjorn. I guess the best thing to do is to make all the calls to fail into something more explicit

Re: [Haskell-cafe] Bug in HTTP (bad internal error handling)

2010-10-23 Thread Ganesh Sittampalam
Hi Bit, On Thu, 21 Oct 2010, Bit Connor wrote: On Sat, Oct 16, 2010 at 10:29 AM, Claus Reinke claus.rei...@talk21.com wrote: After it catches this error, the function returns (line 376): return (fail (show e)) The fail is running in the Either monad (The Result type = Either). This calls

Re: [Haskell-cafe] Re: explicit big lambdas

2010-03-19 Thread Ganesh Sittampalam
On Fri, 19 Mar 2010, o...@okmij.org wrote: Paul Brauner wrote: is there a way in some haskell extension to explicit (system F's) big lambdas and (term Type) applications in order to help type inference? Actually, yes: newtype constructor introductions may act as a big lambda, with

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Ganesh Sittampalam
On Tue, 8 Dec 2009, Tom Tobin wrote: On Tue, Dec 8, 2009 at 3:30 PM, Ben Franksen ben.frank...@online.de wrote: Ketil Malde wrote: Your contributions could still be licensed under a different license (e.g. BSD), as long as the licensing doesn't prevent somebody else to pick it up and

[Haskell-cafe] call for help: FOSDEM devroom

2009-11-08 Thread Ganesh Sittampalam
Hi, I'm thinking of trying to get a devroom for haskell.org at the next FOSDEM, which is Saturday-Sunday February 6th-7th 2010 in Brussels: http://www.fosdem.org/2010/call-developer-rooms The idea would be to try to introduce Haskell to people at FOSDEM who were interested, and thus help

Re: [Haskell-cafe] Re: Darcs and NFS Resolution

2009-09-12 Thread Ganesh Sittampalam
On Sat, 12 Sep 2009, Brandon S. Allbery KF8NH wrote: On Sep 12, 2009, at 11:22 , Trent W. Buck wrote: Jason Dagit da...@codersbase.com writes: which ensures that when the operating system is not WIN32, that renaming of files will be performed by the OS shell. I'm also puzzled as to why this

Re: [Haskell-cafe] Darcs 2.3 and NFS

2009-09-09 Thread Ganesh Sittampalam
On Wed, 9 Sep 2009, Lewis-Sandy, Darrell wrote: Windows Vista, Ubuntu 9.04 32-bit, Ubuntu 64 bit, etc). I have a windows file share that is accessible to all the machines, and has been permanently mounted as a CIFS share on the Linux machines. I have built darcs 2.3 on the Ubuntu 9.04

Re: [Haskell-cafe] Re: Darcs - dependencies between repositories (aka forests)

2009-03-29 Thread Ganesh Sittampalam
On Sun, 29 Mar 2009, Peter Verswyvelen wrote: Module A requires B. When a new developer wants to get the source code, he does a darcs get server://program/A, which gives him only the latest version of A. So he manually needs to do darcs get server://program/B (that B is required is usually

Re: [Haskell-cafe] manipulating predicate formulae

2008-12-04 Thread Ganesh Sittampalam
be you can describe in more detail what you are looking for. Best, Immanuel 2008/11/30 Ganesh Sittampalam [EMAIL PROTECTED] Hi, Are there any Haskell libraries around for manipulating predicate formulae? I had a look on hackage but couldn't spot anything. I am generating complex expressions

Re: [Haskell-cafe] manipulating predicate formulae

2008-12-04 Thread Ganesh Sittampalam
Ganesh Sittampalam [EMAIL PROTECTED] Hi, That sounds like it might be quite useful. What I'm doing is generating some predicates that involve addition/subtraction/comparison of integers and concatenation/comparison of lists of some abstract thing, and then trying to simplify them. An example would

Re: [Haskell-cafe] manipulating predicate formulae

2008-12-01 Thread Ganesh Sittampalam
On Sun, 30 Nov 2008, Neil Mitchell wrote: http://www.cs.york.ac.uk/fp/darcs/proposition/ Unreleased, but might be of interest. It simplifies propositional formulae, and can do so using algebraic laws, custom simplifications or BDDs. I don't really use this library, so if it is of interest to

Re: [Haskell-cafe] Re: howto tuple fold to do n-ary cross product?

2008-11-30 Thread Ganesh Sittampalam
On Sun, 30 Nov 2008, Brandon S. Allbery KF8NH wrote: On 2008 Nov 30, at 12:43, Max Rabkin wrote: It seems to me like this would all be easy if (a,b,c,d) was sugar for (a,(b,(c,d))), and I can't see a disadvantage to that. No disadvantage aside from it making tuples indistinguishable from

[Haskell-cafe] manipulating predicate formulae

2008-11-30 Thread Ganesh Sittampalam
Hi, Are there any Haskell libraries around for manipulating predicate formulae? I had a look on hackage but couldn't spot anything. I am generating complex expressions that I'd like some programmatic help in simplifying. Cheers, Ganesh ___

Re: [Haskell-cafe] Re: Comparing GADTs for Eq and Ord

2008-09-15 Thread Ganesh Sittampalam
On Mon, 15 Sep 2008, Tom Hawkins wrote: OK. But let's modify Expr so that Const carries values of different types: data Expr :: * - * where Const :: a - Term a Equal :: Term a - Term a - Term Bool How would you then define: Const a === Const b = ... Apart from the suggestions about

Re: [Haskell-cafe] Re: Top Level -

2008-09-07 Thread Ganesh Sittampalam
On Sat, 6 Sep 2008, Brandon S. Allbery KF8NH wrote: On 2008 Sep 6, at 18:25, Ashley Yakeley wrote: 2. If the dynamic loader loads an endless stream of different modules containing initialisers, memory will thus leak. I think if the issue is this vs. not being able to guarantee any

[Haskell-cafe] Re: Top Level -

2008-09-07 Thread Ganesh Sittampalam
On Sat, 6 Sep 2008, Ashley Yakeley wrote: Ganesh Sittampalam wrote: The set of ACIO expressions exp is the static initialisers of M. The RTS must note when each static initialiser is run, and cache its result val. Let's call this cache of vals the static results cache of M. When M is loaded

Re: [Haskell-cafe] Re: Top Level -

2008-09-07 Thread Ganesh Sittampalam
On Sun, 7 Sep 2008, Brandon S. Allbery KF8NH wrote: You seem to think we must never insure that something will only be run once, that any program that does require this is broken. As such, the standard Haskell libraries (including some whose interfaces are H98) are unfixably broken and you'd

[Haskell-cafe] Re: Top Level -

2008-09-07 Thread Ganesh Sittampalam
On Sun, 7 Sep 2008, Ashley Yakeley wrote: Ganesh Sittampalam wrote: Suppose I am writing something that I intend to be used as part of a plug-in that is reloaded in different forms again and again. And I see module K which does something I want, so I use it. It so happens that K uses M

[Haskell-cafe] Re: Top Level -

2008-09-06 Thread Ganesh Sittampalam
On Sat, 6 Sep 2008, Ashley Yakeley wrote: Ganesh Sittampalam wrote: But it's limited to the initialisers. An IORef holding an Integer isn't much memory, and it only ever gets leaked once. It happens every time you load and unload, surely? No. An initialiser is only ever run once per run

Re: [Haskell-cafe] Re: Top Level -

2008-09-06 Thread Ganesh Sittampalam
On Sat, 6 Sep 2008, Brandon S. Allbery KF8NH wrote: On 2008 Sep 6, at 6:10, Ashley Yakeley wrote: The set of ACIO expressions exp is the static initialisers of M. The RTS must note when each static initialiser is run, and cache its result val. Let's call this cache of vals the static

Re: [Haskell-cafe] Re: Top Level -

2008-09-06 Thread Ganesh Sittampalam
On Sat, 6 Sep 2008, Brandon S. Allbery KF8NH wrote: On 2008 Sep 6, at 11:22, Ganesh Sittampalam wrote: On Sat, 6 Sep 2008, Brandon S. Allbery KF8NH wrote: On 2008 Sep 6, at 6:10, Ashley Yakeley wrote: The set of ACIO expressions exp is the static initialisers of M. The RTS must note when each

Re: [Haskell-cafe] Functional references

2008-09-05 Thread Ganesh Sittampalam
On Fri, 5 Sep 2008, Jules Bean wrote: I think it would be worth spending some time (on this mailing list, perhaps, or in another forum) trying to hash out a decent API which meets most people's requirements, rather than ending up with 4 or 5 slightly different ones. This sounds like a good

Re: [Haskell-cafe] Top Level -

2008-09-05 Thread Ganesh Sittampalam
On Fri, 5 Sep 2008, Ashley Yakeley wrote: Sittampalam, Ganesh wrote: Ashley Yakeley wrote: I really don't know enough about the RTS to know. The alternative would be to keep all initialised values when the module is unloaded. I'm guessing this is more feasible. Easier, but a guaranteed

[Haskell-cafe] Re: [Haskell] Top Level -

2008-09-02 Thread Ganesh Sittampalam
On Tue, 2 Sep 2008, Ashley Yakeley wrote: Ganesh Sittampalam wrote: I have a feeling it might be non-trivial; the dynamically loaded bit of code will need a separate copy of the module in question, since it might be loaded into something where the module is not already present. Already

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-09-02 Thread Ganesh Sittampalam
On Tue, 2 Sep 2008, Adrian Hey wrote: Ganesh Sittampalam wrote: You see this as a requirement that can be discharged by adding the ACIO concept; I see it as a requirement that should be communicated in the type. Another way of looking at it is that Data.Unique has associated with it some

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-09-01 Thread Ganesh Sittampalam
On Mon, 1 Sep 2008, Adrian Hey wrote: Actually all this use of the tainted and derogatory term global variable is causing me to be imprecise. All MVars/IORefs have global main/process scope whether or not they're bound to something at the top level. Global variable is exactly the right term

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-09-01 Thread Ganesh Sittampalam
On Mon, 1 Sep 2008, John Meacham wrote: On Mon, Sep 01, 2008 at 10:45:05PM +0100, Ganesh Sittampalam wrote: Actually all this use of the tainted and derogatory term global variable is causing me to be imprecise. All MVars/IORefs have global main/process scope whether or not they're bound

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-09-01 Thread Ganesh Sittampalam
On Mon, 1 Sep 2008, Brandon S. Allbery KF8NH wrote: On 2008 Sep 1, at 18:08, Ganesh Sittampalam wrote: On Mon, 1 Sep 2008, John Meacham wrote: for instance, windows dll's have the ability to share individual variables across all loadings of said dll. (for better or worse.) Interesting

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-09-01 Thread Ganesh Sittampalam
On Mon, 1 Sep 2008, Adrian Hey wrote: Ganesh Sittampalam wrote: On Sun, 31 Aug 2008, Adrian Hey wrote: Eh? Please illustrate your point with Data.Unique. What requirements does it place on it's context? (whatever that might mean :-) It requires that its context initialises it precisely once

[Haskell-cafe] Re: [Haskell] Top Level -

2008-09-01 Thread Ganesh Sittampalam
On Mon, 1 Sep 2008, Ashley Yakeley wrote: Ganesh Sittampalam wrote: Well, the question of whether multiple copies of a module are ok is still open, I guess - as you say later, it seems perfectly reasonable for two different versions of Data.Unique to exist, each with their own types

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-09-01 Thread Ganesh Sittampalam
On Mon, 1 Sep 2008, Ashley Yakeley wrote: Ganesh Sittampalam wrote: Right, but they might be the same package version, if one is a dynamically loaded bit of code and the other isn't. OK. It's up to the dynamic loader to deal with this, and make sure that initialisers are not run more than

[Haskell-cafe] Re: [Haskell] Top Level -

2008-08-31 Thread Ganesh Sittampalam
On Sat, 30 Aug 2008, Ashley Yakeley wrote: OK. Let's call it top-level scope. Haskell naturally defines such a thing, regardless of processes and processors. Each top-level - would run at most once in top-level scope. If you had two Haskell runtimes call by C code, each would have its own

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-31 Thread Ganesh Sittampalam
On Sat, 30 Aug 2008, Adrian Hey wrote: Ganesh Sittampalam wrote: Well, yes, but if I implemented a library in standard Haskell it would always be safely serialisable/deserialisable (I think). So the global variables hack somehow destroys that property - how do I work out why it does in some

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-31 Thread Ganesh Sittampalam
On Sun, 31 Aug 2008, Brandon S. Allbery KF8NH wrote: On 2008 Aug 31, at 10:20, Ganesh Sittampalam wrote: I'm not sure of precisely what you mean here, but stdin, stdout and stderr are things provided by the OS to a process. That's what defines them as having process scope, not something

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-31 Thread Ganesh Sittampalam
On Sun, 31 Aug 2008, Brandon S. Allbery KF8NH wrote: On 2008 Aug 31, at 10:29, Ganesh Sittampalam wrote: On Sun, 31 Aug 2008, Brandon S. Allbery KF8NH wrote: On 2008 Aug 31, at 10:20, Ganesh Sittampalam wrote: I'm not sure of precisely what you mean here, but stdin, stdout and stderr

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-31 Thread Ganesh Sittampalam
On Sun, 31 Aug 2008, Adrian Hey wrote: Thanks for taking the time to do this Dan. I think the safety requirement has been met, but I think it fails on the improved API. The main complaint would be what I see as loss of modularity, in that somehow what should be a small irrelevant detail of

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-31 Thread Ganesh Sittampalam
On Sun, 31 Aug 2008, Brandon S. Allbery KF8NH wrote: On 2008 Aug 31, at 10:34, Ganesh Sittampalam wrote: I don't follow what you mean. stdin, stdout and stderr are just file descriptors 0, 1 and 2, aren't they? You can create them as many times as you want with using that information

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-31 Thread Ganesh Sittampalam
On Sun, 31 Aug 2008, Brandon S. Allbery KF8NH wrote: On 2008 Aug 31, at 11:20, Ganesh Sittampalam wrote: Where do the filehandle structures live in the latter case? The place you clearly think so little of that you need to ask: process-global (or process-local depending on how you think

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-31 Thread Ganesh Sittampalam
On Sun, 31 Aug 2008, Adrian Hey wrote: Ganesh Sittampalam wrote: On Sun, 31 Aug 2008, Adrian Hey wrote: Thanks for taking the time to do this Dan. I think the safety requirement has been met, but I think it fails on the improved API. The main complaint would be what I see as loss

Re: [Haskell-cafe] Top Level -

2008-08-31 Thread Ganesh Sittampalam
On Sun, 31 Aug 2008, Brandon S. Allbery KF8NH wrote: On 2008 Aug 31, at 12:01, Ganesh Sittampalam wrote: On Sun, 31 Aug 2008, Brandon S. Allbery KF8NH wrote: On 2008 Aug 31, at 11:20, Ganesh Sittampalam wrote: Where do the filehandle structures live in the latter case? The place you

Re: [Haskell-cafe] Top Level -

2008-08-31 Thread Ganesh Sittampalam
On Sun, 31 Aug 2008, Brandon S. Allbery KF8NH wrote: On 2008 Aug 31, at 13:20, Ganesh Sittampalam wrote: I'm afraid I don't see how this generalises to sharing something across an entire process where the things that want to do the sharing are not in or controlled by the same shared library

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-30 Thread Ganesh Sittampalam
On Sat, 30 Aug 2008, Adrian Hey wrote: Ganesh Sittampalam wrote: Will Data.Unique still work properly if a value is sent across a RPC interface? A value of type Unique you mean? This isn't possible. Data.Unique has been designed so cannot be Shown/Read or otherwise serialised/deserialised

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-30 Thread Ganesh Sittampalam
On Sat, 30 Aug 2008, Ashley Yakeley wrote: Ganesh Sittampalam wrote: If you want to standardise a language feature, you have to explain its behaviour properly. This is one part of the necessary explanation. To be concrete about scenarios I was considering, what happens if: - the same

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-30 Thread Ganesh Sittampalam
On Sat, 30 Aug 2008, Adrian Hey wrote: Ganesh Sittampalam wrote: How do the implementers of Data.Unique know that they musn't let them be serialised/deserialised? Because if you could take a String and convert it to a Unique there would be no guarantee that result was *unique*. Well, yes

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-30 Thread Ganesh Sittampalam
On Sat, 30 Aug 2008, Ashley Yakeley wrote: Ganesh Sittampalam wrote: Every single call to newIORef, across the whole world, returns a different ref. How do you know? How can you compare them, except in the same Haskell expression? I can write to one and see if the other changes. The same

[Haskell-cafe] Re: [Haskell] Top Level -

2008-08-30 Thread Ganesh Sittampalam
On Sat, 30 Aug 2008, Ashley Yakeley wrote: Is it the functionality of Data.Unique that you object to, or the fact that it's implemented with a global variable? If the former, one could easily build Unique values on top of IORefs, since IORef is in Eq. Thus Data.Unique is no worse than IORefs

[Haskell-cafe] Re: [Haskell] Top Level -

2008-08-30 Thread Ganesh Sittampalam
On Sat, 30 Aug 2008, Ashley Yakeley wrote: Ganesh Sittampalam wrote: This seems fine to me. It's based on something that already does work properly across a process scope, But you agree that IORefs define a concept of process scope? I'm not sure that they *define* process scope, because

[Haskell-cafe] Re: [Haskell] Top Level -

2008-08-30 Thread Ganesh Sittampalam
On Sat, 30 Aug 2008, Ashley Yakeley wrote: Ganesh Sittampalam wrote: On Sat, 30 Aug 2008, Ashley Yakeley wrote: Ganesh Sittampalam wrote: This seems fine to me. It's based on something that already does work properly across a process scope, But you agree that IORefs define a concept

[Haskell-cafe] Re: [Haskell] Top Level -

2008-08-30 Thread Ganesh Sittampalam
On Sat, 30 Aug 2008, Ashley Yakeley wrote: Ganesh Sittampalam wrote: Firstly, that's a property of the current implementation, rather than a universal one, IMO. I don't for example see why you couldn't add a newIORef variant that points into shared memory, locking issues aside. OK, so

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-29 Thread Ganesh Sittampalam
On Thu, 28 Aug 2008, Adrian Hey wrote: Ganesh Sittampalam wrote: On Thu, 28 Aug 2008, Adrian Hey wrote: There's no semantic difficulty with the proposed language extension, How does it behave in the presence of dynamic loading? To answer this you need to be precise about the semantics

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Ganesh Sittampalam
On Thu, 28 Aug 2008, Adrian Hey wrote: implicit parameters (a highly dubious language feature IMO). How can you say that with a straight face at the same time as advocating global variables? :-) Ganesh ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Ganesh Sittampalam
On Thu, 28 Aug 2008, Adrian Hey wrote: There's no semantic difficulty with the proposed language extension, How does it behave in the presence of dynamic loading? What about remote procedure calls? Also what if I want a thread-local variable? It seems like an extension like this should

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-27 Thread Ganesh Sittampalam
On Wed, 27 Aug 2008, Jonathan Cast wrote: * I wonder why that name was chosen? The design doesn't seem to have anything to do with IO, it's more of a `we have this in C so we want it in Haskell too' monad. The 'C' in ACIO says that it commutes with any operation in the IO monad. Without that

Re: [Haskell-cafe] type families and type signatures

2008-04-08 Thread Ganesh Sittampalam
On Wed, 9 Apr 2008, Manuel M T Chakravarty wrote: Sittampalam, Ganesh: No, I meant can't it derive that equality when matching (Id a) against (Id b)? As you say, it can't derive (a ~ b) at that point, but (Id a ~ Id b) is known, surely? No, it is not know. Why do you think it is? Well,

[Haskell-cafe] type families and type signatures

2008-04-06 Thread Ganesh Sittampalam
Hi, The following program doesn't compile in latest GHC HEAD, although it does if I remove the signature on foo'. Is this expected? Cheers, Ganesh {-# LANGUAGE TypeFamilies #-} module Test7 where type family Id a type instance Id Int = Int foo :: Id a - Id a foo = id foo' :: Id a - Id a

Re: [Haskell-cafe] type families and type signatures

2008-04-06 Thread Ganesh Sittampalam
On Sun, 6 Apr 2008, Thomas M. DuBuisson wrote: Id is an operation over types yielding a type, as such it doesn't make much sense to me to have (Id a - Id a) but rather something like (a - Id a). One could make this compile by adding the obvious instance: type instance Id a = a Curiously,

Re: [Haskell-cafe] type families and type signatures

2008-04-06 Thread Ganesh Sittampalam
On Mon, 7 Apr 2008, Manuel M T Chakravarty wrote: Ganesh Sittampalam: The following program doesn't compile in latest GHC HEAD, although it does if I remove the signature on foo'. Is this expected? Yes, unfortunately, this is expected, although it is very unintuitive

Re: [Haskell-cafe] Monad instance for Data.Set, again

2008-03-28 Thread Ganesh Sittampalam
On Fri, 28 Mar 2008, Wolfgang Jeltsch wrote: But it is possible to give a construction of an Ord dictionary from an AssociatedMonad dictionary. See the attached code. It works like a charm. :-) This is really cool, and with much wider applicability than restricted monads; it gives us a

Re: [Haskell-cafe] Monad instance for Data.Set

2008-03-25 Thread Ganesh Sittampalam
On Tue, 25 Mar 2008, Ryan Ingram wrote: I was experimenting with Prompt today and found that you can get a restricted monad style of behavior out of a regular monad using Prompt: I recently developed a similar trick: http://hsenag.livejournal.com/11803.html It uses the regular MonadPlus

Re: [Haskell-cafe] problem with type equality constraints

2008-03-17 Thread Ganesh Sittampalam
On Mon, 17 Mar 2008, Manuel M T Chakravarty wrote: Your are completely right. Unfortunately, superclass equalities (ie, the Id a ~ ida in the class declaration of Foo) aren't fully implemented yet. OK, thanks. Is there any rough idea of when they will be? If I am not mistaken, superclass

Re: [Haskell-cafe] problem with type equality constraints

2008-03-17 Thread Ganesh Sittampalam
On Tue, 18 Mar 2008, Manuel M T Chakravarty wrote: Ganesh Sittampalam: On Mon, 17 Mar 2008, Manuel M T Chakravarty wrote: Your are completely right. Unfortunately, superclass equalities (ie, the Id a ~ ida in the class declaration of Foo) aren't fully implemented yet. OK, thanks

[Haskell-cafe] problem with type equality constraints

2008-03-16 Thread Ganesh Sittampalam
Hi, When I try to compile this code with ghc-6.9.20080310: module Test2 where type family Id a type instance Id Int = Int type instance Id (a, b) = (Id a, Id b) class Id a ~ ida = Foo a ida instance Foo Int Int instance (Foo a ida, Foo b idb) = Foo (a, b) (ida, idb) I get these errors:

[Haskell-cafe] Re: [Debian-haskell] OT: ghc 6.8 in Debian?

2007-12-28 Thread Ganesh Sittampalam
On Fri, 28 Dec 2007, Magnus Therning wrote: It seems my emails to the Debian Haskell list (CC'd on this email as well) are silently dropped :-( I don't believe that's the case; I've been getting them, and they're in the archive:

Re: IO StateTransformer with an escape clause

2003-09-01 Thread Ganesh Sittampalam
On Tue, 26 Aug 2003 14:33:28 +1000, Thomas L. Bevan [EMAIL PROTECTED] wrote: Hi, I'd like some help building an IO StateTransformer which can be escaped midway through without losing the state accummulated up to that point. I tried constructing a StateT s MaybeIO a monad but the state is lost

Re: ML like pattern matching

2003-08-22 Thread Ganesh Sittampalam
On Fri, 22 Aug 2003 15:49:15 +0300, Cagdas Ozgenc [EMAIL PROTECTED] wrote: How do I emulate the when clause in ML for pattern matching? In other words when a pattern is matched (from a list of patterns of a function) and to enforce additional predicates I use guards, but if the guard condition

Re: syntax across languages

2002-02-12 Thread Ganesh Sittampalam
On 12 Feb 2002 14:49:16 +0100, Pixel [EMAIL PROTECTED] wrote: eurk ERROR /usr/share/hugs/lib/exts/ST.hs:48 - Syntax error in type expression (unexpected `.') isn't there a way ST.hs would require the extensions? a pragma or something? someone not knowing the -98 would wonder for a long time