Re: [Haskell-cafe] Introspection on types.
Thanks, I'll check out Data and Typeable --- On Thu, 10/1/09, Brandon S. Allbery KF8NH allb...@ece.cmu.edu wrote: From: Brandon S. Allbery KF8NH allb...@ece.cmu.edu Subject: Re: [Haskell-cafe] Introspection on types. To: Gregory Propf gregorypr...@yahoo.com Cc: Brandon S. Allbery KF8NH allb...@ece.cmu.edu, Haskell-Cafe haskell-cafe@haskell.org Date: Thursday, October 1, 2009, 6:14 PM On Oct 1, 2009, at 19:22 , Gregory Propf wrote:Is there a way to tell, let's say, how many constructors there are for a type? Or do I need one of the haskell extensions I've read about? If the constructors are nullary (that is: data MyData = Foo | Bar | Baz) you could derive Enum and Bounded, then (maxBound :: MyData) is one less than the number of constructors. Anything more complicated requires deriving Data or Typeable (I've done it with the latter but don't recall details off the top of my head). -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.comsystem administrator [openafs,heimdal,too many hats] allb...@ece.cmu.eduelectrical and computer engineering, carnegie mellon university KF8NH ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Market Place for Haskell development teams?
Hey, first of all, in terms of a platform for promoting haskell commercially, happstutorial.com actually implements a job board. Yeah, it's primitive and not feature complete, but on hackage, open source, and ready for anyone who would like to work on it. (Currently maintained by creighton hogg.) This was my baby in 2008, when I was looking to foster happs for web development, as a sort of smarter ruby on rails, which I am using in the field in patch-tag.com. 2, the haskell-startup google group at http://groups.google.com/group/haskell-startup It's private, to encourage slightly more courageous business talk away from the panoptic gaze of google, but I approve pretty much anyone who doesn't want in and isn't a bot. Yes. Let's create a world with more jobs for haskell developers, and better software for everyone :) thomas. 2009/10/1 Curt Sampson c...@starling-software.com: On 2009-09-29 13:18 +0200 (Tue), Alberto G. Corona wrote: What is the vehicle that haskell can use to enter the mainstream?. Actually, I have one more thought on that: wait. I'd had the impression that Haskell was becoming fairly well known (if not yet heavily used, in comparison to languages like Java), but I just ran across some hard evidence for this. In the 32 languages ranked on http://www.langpop.com/ , Haskell consistently comes down near the bottom in the various rankings of use. (But hey, we're not so weird we're not in there!) But if you look down near the bottom, at the chart labeled Normalized Discussion Site Results, you'll notice that Haskell comes out sixth. Even trying to be more fair to the mainstream, and changing the weighting to drop Lambda the Ultimate completely (after all, they're just a bunch of academic wankers, right?) and bring IRC down to a contribution of 0.5 instead of 1 (apparently those academic wankers have lots of time to chat online), Haskell still comes out tenth, with a score over a third that of the leader, Java, and close to half that of PHP and C (2nd and 3rd place, respectively). We've also got at least one undeniably good, production-quality compiler (which is more than PHP or Ruby can say), and have sold many tens of thousands, perhaps even hundreds of thousands, of books. At this point, I don't think many people (John A. De Goes excepted) are looking at people writing major applications in Haskell as if they're aliens living on another planet. Haskell is in the mainstream already as far as being taken seriously; most of the complaints I'm seeing seem to be grasping at the same kinds of straws that the anti-Java guys were back in the late '90s. (It's hopeless if it uses garbage collection.) We've even got our own over-hyped, under-utilized supposed benefit (it's good for multicore). The main whinging seems to be about libraries, of which we have only 1585 on hackage. Compare with RubyForge, which has 2059 projects in beta or better status, or 2961 if we include alpha as well. The Ruby Application Archive has 1768 projects; I have no idea how much overlap there is, or how many of these are real. I think we just need to sit tight for a couple of years. cjs -- Curt Sampson c...@starling-software.com +81 90 7737 2974 Functional programming in all senses of the word: http://www.starling-software.com ___ 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] Market Place for Haskell development teams?
correction, happstutorial is now tutorial.happstack.com. 2009/10/2 Thomas Hartman tphya...@gmail.com: Hey, first of all, in terms of a platform for promoting haskell commercially, happstutorial.com actually implements a job board. Yeah, it's primitive and not feature complete, but on hackage, open source, and ready for anyone who would like to work on it. (Currently maintained by creighton hogg.) This was my baby in 2008, when I was looking to foster happs for web development, as a sort of smarter ruby on rails, which I am using in the field in patch-tag.com. 2, the haskell-startup google group at http://groups.google.com/group/haskell-startup It's private, to encourage slightly more courageous business talk away from the panoptic gaze of google, but I approve pretty much anyone who doesn't want in and isn't a bot. Yes. Let's create a world with more jobs for haskell developers, and better software for everyone :) thomas. 2009/10/1 Curt Sampson c...@starling-software.com: On 2009-09-29 13:18 +0200 (Tue), Alberto G. Corona wrote: What is the vehicle that haskell can use to enter the mainstream?. Actually, I have one more thought on that: wait. I'd had the impression that Haskell was becoming fairly well known (if not yet heavily used, in comparison to languages like Java), but I just ran across some hard evidence for this. In the 32 languages ranked on http://www.langpop.com/ , Haskell consistently comes down near the bottom in the various rankings of use. (But hey, we're not so weird we're not in there!) But if you look down near the bottom, at the chart labeled Normalized Discussion Site Results, you'll notice that Haskell comes out sixth. Even trying to be more fair to the mainstream, and changing the weighting to drop Lambda the Ultimate completely (after all, they're just a bunch of academic wankers, right?) and bring IRC down to a contribution of 0.5 instead of 1 (apparently those academic wankers have lots of time to chat online), Haskell still comes out tenth, with a score over a third that of the leader, Java, and close to half that of PHP and C (2nd and 3rd place, respectively). We've also got at least one undeniably good, production-quality compiler (which is more than PHP or Ruby can say), and have sold many tens of thousands, perhaps even hundreds of thousands, of books. At this point, I don't think many people (John A. De Goes excepted) are looking at people writing major applications in Haskell as if they're aliens living on another planet. Haskell is in the mainstream already as far as being taken seriously; most of the complaints I'm seeing seem to be grasping at the same kinds of straws that the anti-Java guys were back in the late '90s. (It's hopeless if it uses garbage collection.) We've even got our own over-hyped, under-utilized supposed benefit (it's good for multicore). The main whinging seems to be about libraries, of which we have only 1585 on hackage. Compare with RubyForge, which has 2059 projects in beta or better status, or 2961 if we include alpha as well. The Ruby Application Archive has 1768 projects; I have no idea how much overlap there is, or how many of these are real. I think we just need to sit tight for a couple of years. cjs -- Curt Sampson c...@starling-software.com +81 90 7737 2974 Functional programming in all senses of the word: http://www.starling-software.com ___ 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] ANNOUNCE: SourceGraph 0.5.2.0
Yes, this is yet another SourceGraph announcement, this time for version 0.5.2.0 [1]. [1] http://hackage.haskell.org/package/SourceGraph-0.5.2.0 The changes in this release are as follows: * Shift overall analysis to the top and per-module analysis to the end, as suggested by Duncan Coutts. * Graph drawing fixups: instances are now drawn correctly, and the module graph now has modules located in the correct directory. * Improve some graph drawing aspects (node margins, colours for module graphs, etc.). -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell for Physicists
Haskell for closing the gap between specification and code On Wed, Sep 30, 2009 at 1:42 PM, ed...@ymonad.com wrote: Hi, I will give a seminar to physicists at USP (Universidade de São Paulo, Brazil) university and they asked me for a good title, something that can attract physicists. Anyone has some suggestions? (Will be a seminar about the use of Haskell to substitute C or Fortran in a lot of tasks, and how it can be used in some problems instead of Matlab, Mathematica, etc.) Thanks, Edgar ___ 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] Market Place for Haskell development teams?
On Oct 1, 2009, at 12:13 AM, Curt Sampson wrote: And as far as something like dealing with a changing language and libraries, the mainstream already has well-established and popular techniques for doing just: agile development. A project manager's worst nightmare: Sorry boss, but we're just not going to be able to meet that deadline, because, well, a language extension we were using was dropped from the language, and the syntax for some core operators was changed. Not only is our code broken, but many of the libraries we were using are broken. Don't worry, though, we're 'agile', so our unit tests will tell us when our code is working again. Big business demands stability. Regards, John ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Market Place for Haskell development teams?
2009/10/2 John A. De Goes j...@n-brain.net: On Oct 1, 2009, at 12:13 AM, Curt Sampson wrote: And as far as something like dealing with a changing language and libraries, the mainstream already has well-established and popular techniques for doing just: agile development. A project manager's worst nightmare: Sorry boss, but we're just not going to be able to meet that deadline, because, well, a language extension we were using was dropped from the language, and the syntax for some core operators was changed. Not only is our code broken, but many of the libraries we were using are broken. Don't worry, though, we're 'agile', so our unit tests will tell us when our code is working again. Big business demands stability. Hi, Of course, the haskell community is that immature. People keep dropping extensions without a thought for potential problems. And the package versioning policy is just a joke written for next april fools day. Sorry for the spoiler. Cheers, Thu ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Market Place for Haskell development teams?
On Oct 1, 2009, at 9:56 AM, Curt Sampson wrote: The main whinging seems to be about libraries, of which we have only 1585 on hackage. It's not just about the _number_ of libraries, but the _usefulness_ of them for solving real-world problems. Haskell has a large number of libraries that are of no interest whatsoever to commercial software developers (new numerical hierarchies, category theory libraries, etc.), and is missing many key libraries that would be of great commercial value. Regards, John A. De Goes N-Brain, Inc. The Evolution of Collaboration http://www.n-brain.net|877-376-2724 x 101 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Market Place for Haskell development teams?
I'm not saying Haskell is unstable. I'm saying that the attitude expressed in the following quote is at odds with the needs of business: And as far as something like dealing with a changing language and libraries, the mainstream already has well-established and popular techniques for doing just: agile development. Regards, John A. De Goes N-Brain, Inc. The Evolution of Collaboration http://www.n-brain.net|877-376-2724 x 101 On Oct 2, 2009, at 9:03 AM, minh thu wrote: 2009/10/2 John A. De Goes j...@n-brain.net: On Oct 1, 2009, at 12:13 AM, Curt Sampson wrote: And as far as something like dealing with a changing language and libraries, the mainstream already has well-established and popular techniques for doing just: agile development. A project manager's worst nightmare: Sorry boss, but we're just not going to be able to meet that deadline, because, well, a language extension we were using was dropped from the language, and the syntax for some core operators was changed. Not only is our code broken, but many of the libraries we were using are broken. Don't worry, though, we're 'agile', so our unit tests will tell us when our code is working again. Big business demands stability. Hi, Of course, the haskell community is that immature. People keep dropping extensions without a thought for potential problems. And the package versioning policy is just a joke written for next april fools day. Sorry for the spoiler. Cheers, Thu ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Market Place for Haskell development teams?
Sorry boss, but we're just not going to be able to meet that deadline, because, well, a language extension we were using was dropped from the language, and the syntax for some core operators was changed. Not only is our code broken, but many of the libraries we were using are broken. Don't worry, though, we're 'agile', so our unit tests will tell us when our code is working again. Big business demands stability. And yet they use IE... how many projects have I had to spend substantial time fixing because Microsoft releases a new IE... ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: ANNOUNCE: SourceGraph 0.5.2.0
Ivan Lazar Miljenovic wrote: Yes, this is yet another SourceGraph announcement, this time for version 0.5.2.0 [1]. [1] http://hackage.haskell.org/package/SourceGraph-0.5.2.0 installation went well, but I get a rather uninformative error message for 505 source files: cabal build: [505 of 505] Compiling Main SourceGraph: Parse error: Last statement in a do-block must be an expression Cheers Christian ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Designing a DSL?
Hi, there are numerous examples on how to implement a DSL, but I haven't been able to figure out how to design one. I mean I have a pretty good idea of the problem domain, I've coded it over and over again until I got it right. Now I'd like to express that part as a DSL instead of hard coding it as before so I can be more prepared if I need to change or amend it. Ideally I'd only have to change the interpreter, right? And that I find to be the really tricky part, how do I *design* a DSL? Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Designing a DSL?
Günther Schmidt wrote: And that I find to be the really tricky part, how do I *design* a DSL? My favorite approach is something like as described in these: http://lukepalmer.wordpress.com/2008/07/18/semantic-design/ http://conal.net/papers/type-class-morphisms/ It takes a little bit of time to come up with great abstractions, but when you finally do it's an amazing feeling. - Jake ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell for Physicists
Hi Edgar No-one seems to have pointed you to the Maestro: http://users.info.unicaen.fr/~karczma/arpap/ The quantum mechanics one might be the most directly useful, but they are all great reads: http://users.info.unicaen.fr/~karczma/arpap/hasiqm.pdf Best wishes Stephen 2009/9/30 ed...@ymonad.com: Hi, I will give a seminar to physicists at USP (Universidade de São Paulo, Brazil) university and they asked me for a good title, something that can attract physicists. Anyone has some suggestions? (Will be a seminar about the use of Haskell to substitute C or Fortran in a lot of tasks, and how it can be used in some problems instead of Matlab, Mathematica, etc.) Thanks, Edgar ___ 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] Re: Cal, Clojure, Groovy, Haskell, OCaml, etc.
Hong Yang wrote: Good libraries are not enough for a language to go beyond mere existence. There must exist good documents, i.e., good tutorials, good books, and good explanations and examples in the libraries, etc, that are easy for people to learn and use. In my humble opinion, Haskell has a lot of libraries, but most of them offer few examples of how to use the modules. In this regards, Perl is much much better. I wouldn't say 'better' as many, if not most, Perl libraries offer not much beyond example usage as documentation. Even if they do, the docs are often ambiguous, corner cases left to the user's imagination -- which is (at least in my case) regularly different from the library author's -- etc. IMO this is just the other extreme of the spectrum. It sure gets you started quite cheaply, but in the long run you pay an ugly amount of interest as you spend more and more time with debugging due to said ambiguities and corner cases. BTW, apparently, Perl library authors like to model their APIs after their mother language Perl itself, of which one could justly say that its only exact definition /is/ its implementation. Which doesn't mean that documentation of many Haskell libs couldn't be greatly improved... Cheers Ben ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Market Place for Haskell development teams?
Fairly late to the party on this discussion, but this captured my attention: On Tue, Sep 29, 2009 at 11:35 AM, Curt Sampson c...@starling-software.comwrote: This may be somewhat anecdotal evidence, but I disagree with both of your statements here. I've rarely known anybody to use Java cross-platform in a non-trival way, barring a few major GUI-centric projects such as Eclipse. (I've far more cross-platform use of Haskell than Java myself.) And I know of nobody who did anything serious with download-execution of Java. I agree with the download/execution part of this, but I'd be willing to bet that it is incredibly common for Java developers to write and test code in an environment very different from the actual deployment environment. With Java, it requires no special forethought to write an application on a Windows or Mac laptop, be able to run all the unit tests, etc., locally, and then deploy the production application to a Linux or Solaris or *nix server (or a combination) without any required recompilation. This is a pretty powerful selling point for the JVM as a target platform, and everywhere I've seen Java used, it's been taken advantage of. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Market Place for Haskell development teams?
On Fri, Oct 2, 2009 at 10:54 AM, John A. De Goes j...@n-brain.net wrote: On Oct 1, 2009, at 12:13 AM, Curt Sampson wrote: And as far as something like dealing with a changing language and libraries, the mainstream already has well-established and popular techniques for doing just: agile development. A project manager's worst nightmare: Sorry boss, but we're just not going to be able to meet that deadline, because, well, a language extension we were using was dropped from the language, and the syntax for some core operators was changed. Not only is our code broken, but many of the libraries we were using are broken. Don't worry, though, we're 'agile', so our unit tests will tell us when our code is working again. While I agree that it probably isn't the right idea to say that we are Agile, so it is safe for us to build on a foundation that is constantly shifting underneath us, this same argument came up from Credit Suisse regarding the standardization of Haskell' at ICFP 06. At the time, as I recall, they were limiting themselves to Haskell 98 + Addenda. I argued that they should be interesting in having _more_ such standardization efforts to bring into the fold more features that they can rely upon. Even so, Haskell' includes only one breaking change (dropping n+k patterns) at this time and really how often do language features get dropped from GHC? (And at the time even the n+k change was laughed at by the audience as a joke proposal, not one that anyone was serious about -- how times have changed). There have been a couple of quirky changes in how big scary types involving scoped type variables change. Otherwise it has been far more stable and consistent over the last 11 year run than any non-toy compiler that *I* can think of. Heck, think how different your C compiler is now than it was in 1999. It feels, to me that there are more breaking changes in just upgrading to, say, C99 than there have been over the entire post-Haskell 98 life of GHC. -Edward Kmett Big business demands stability. Regards, John ___ 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] Mutable data within a (non-IO) monad
Hey everyone, I am thinking about creating a particular data structure with an immutable and mutable version. The key of my problem is that I would like the user to be able to work with a mutable version of the data within a non-IO monad and then get an immutable value at the end, allowing them to do stateful-like computation in pure code. The key is that I need to enforce the ordering within the monad, but I can't do this using a state-transformer since the state doesn't actually change; instead, the data structure is internally modified, but the original pointer is kept to it. There are many data structures which already have this kind of functionality, such as STRefs and MArrays, however I am having trouble distilling from the source code what the best trick is to accomplish mutability of this form within a monad. There seem to be at least a couple of strategies: using type-threading with GHC's State# type, and using the ST monad with a rank-2 qualifier over the type of the state. Do you all have any thoughts on ways to solve this problem, and/or a high-level explanation of what is going behind the scenes with STRefs and MArrays? Thanks! - Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: ANNOUNCE: SourceGraph 0.5.2.0
Christian Maeder christian.mae...@dfki.de writes: Ivan Lazar Miljenovic wrote: installation went well, but I get a rather uninformative error message for 505 source files: cabal build: [505 of 505] Compiling Main :o There is no way that there's 505 source files in SourceGraph... and I just did a clean install of SourceGraph and it works fine :s SourceGraph: Parse error: Last statement in a do-block must be an expression This is a parse error from haskell-src-exts. Are you sure that your code is valid? -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Market Place for Haskell development teams?
On Oct 2, 2009, at 18:46 , Edward Kmett wrote: On Fri, Oct 2, 2009 at 10:54 AM, John A. De Goes j...@n-brain.net wrote: On Oct 1, 2009, at 12:13 AM, Curt Sampson wrote: And as far as something like dealing with a changing language and libraries, the mainstream already has well-established and popular techniques for doing just: agile development. A project manager's worst nightmare: Sorry boss, but we're just not going to be able to meet that deadline, because, well, a language extension we were using was dropped from the language, and the syntax for some core operators was changed. Not only is our code broken, but many of the libraries we were using are broken. Don't worry, though, we're 'agile', so our unit tests will tell us when our code is working again. While I agree that it probably isn't the right idea to say that we are Agile, so it is safe for us to build on a foundation that is constantly shifting underneath us, this same argument came up from Credit Suisse regarding the standardization of Haskell' at ICFP 06. At the time, as I recall, they were limiting themselves to Haskell 98 + Addenda. I'm wondering if the referent here is to the notion that associated types will replace functional dependencies. As I understand it, it's nowhere near being possible and possibly still an area of active research. Other than that, linear implicit parameters were removed from GHC; an experimental (never standardized, or even proposed for a standard) feature that was never widely used (or used at all?). There wasn't any outcry that I recall when they went away. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon universityKF8NH PGP.sig Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Mutable data within a (non-IO) monad
Sorry to reply to my own posting, but... AHA! I see now what's going on. The purpose of the rank-2 qualifier is to prevent STRefs from leaking outside of the runST call, and what the code does at the lowest level is that it passes around a token state object to force the compiler to correctly order the calculations. Very cool. :-) Cheers, Greg On Oct 2, 2009, at 4:08 PM, Gregory Crosswhite wrote: Hey everyone, I am thinking about creating a particular data structure with an immutable and mutable version. The key of my problem is that I would like the user to be able to work with a mutable version of the data within a non-IO monad and then get an immutable value at the end, allowing them to do stateful-like computation in pure code. The key is that I need to enforce the ordering within the monad, but I can't do this using a state-transformer since the state doesn't actually change; instead, the data structure is internally modified, but the original pointer is kept to it. There are many data structures which already have this kind of functionality, such as STRefs and MArrays, however I am having trouble distilling from the source code what the best trick is to accomplish mutability of this form within a monad. There seem to be at least a couple of strategies: using type-threading with GHC's State# type, and using the ST monad with a rank-2 qualifier over the type of the state. Do you all have any thoughts on ways to solve this problem, and/or a high-level explanation of what is going behind the scenes with STRefs and MArrays? Thanks! - Greg ___ 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