Re: ANNOUNCE: GHC version 6.10.1 - MacOS installer
On 2008 Nov 4, at 20:26, Jason Dagit wrote: On Tue, Nov 4, 2008 at 4:26 PM, Manuel M T Chakravarty <[EMAIL PROTECTED]> wrote: Jason Dagit: I'm on OSX and I currently have ghc-6.6.1 and ghc-6.8.3 (installed from a pkg). I would like to add ghc-6.10.1 to my system. I tried to do this with RC1 of 6.10, but I found that it uninstalled my ghc-6.8.3. What will I need to do to get both 6.8.3 and 6.10.1? Are you sure it does deinstall the 6.8 compiler? Or does it just overwrite the symbolic links in /usr/bin? To check, have a look at /Library/Frameworks/GHC.framework/Versions After installing 6.10, there should be a 608/ and a 610/ directory. This certainly happens on my Mac and I am not aware of an option to change that behaviour. I haven't tried the 6.10.1 install, but after using the 6.8.3 pkg followed by the 6.10 RC1 pkg, followed by the 6.8.3 pkg, I have just 608 in the directory you mention. I expect if you used the OSX installer then /Library/Receipts is screwing you (it wipes the old files listed in the .bom file). Try finding and removing the receipt directory and bom file before installing. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED] system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED] electrical and computer engineering, carnegie mellon universityKF8NH ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: ANNOUNCE: GHC version 6.10.1 - MacOS installer
On Tue, Nov 4, 2008 at 4:26 PM, Manuel M T Chakravarty <[EMAIL PROTECTED]> wrote: > Jason Dagit: >> >> On Tue, Nov 4, 2008 at 10:11 AM, Ian Lynagh <[EMAIL PROTECTED]> wrote: >>> >>> How to get it >>> ~ >>> >>> The easy way is to go to the web page, which should be self-explanatory: >>> >>> http://www.haskell.org/ghc/ >>> >>> We supply binary builds in the native package format for many >>> platforms, and the source distribution is available from the same >>> place. >>> >>> Packages will appear as they are built - if the package for your >>> system isn't available yet, please try again later. >> >> I'm on OSX and I currently have ghc-6.6.1 and ghc-6.8.3 (installed >> from a pkg). I would like to add ghc-6.10.1 to my system. I tried to >> do this with RC1 of 6.10, but I found that it uninstalled my >> ghc-6.8.3. >> >> What will I need to do to get both 6.8.3 and 6.10.1? > > Are you sure it does deinstall the 6.8 compiler? Or does it just overwrite > the symbolic links in /usr/bin? To check, have a look at > > /Library/Frameworks/GHC.framework/Versions > > After installing 6.10, there should be a 608/ and a 610/ directory. This > certainly happens on my Mac and I am not aware of an option to change that > behaviour. I haven't tried the 6.10.1 install, but after using the 6.8.3 pkg followed by the 6.10 RC1 pkg, followed by the 6.8.3 pkg, I have just 608 in the directory you mention. I guess I should try the 6.10.1 install. If I have to reinstall 6.8.3 again, not the end of the world for me. > And while we are at it...a BIG FAT WARNING: > > If you installed the 6.10.200081007 pre-release installer package, > uninstall that *before* installing the 6.10.1 package. Okay thanks. Although, I don't think that will be a problem for me given the directories I can see. Thanks, Jason ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: ANNOUNCE: GHC version 6.10.1 - MacOS installer
On Wed, Nov 05, 2008 at 11:26:20AM +1100, Manuel M T Chakravarty wrote: > Jason Dagit: > > > >What will I need to do to get both 6.8.3 and 6.10.1? > > Are you sure it does deinstall the 6.8 compiler? It definitely deinstalls it for me; I've just confirmed it. Here's what I saw with a 6.9 OS X installer a while ago: If I start off with 6.8.3 installed: $ ls -l /Library/Frameworks/GHC.framework/Versions/ total 8 drwxrwxr-x 4 root admin 136 Jun 18 03:10 608 lrwxr-xr-x 1 root admin3 Aug 29 12:57 Current -> 608 then while my GHC-6.9.20080828-i386.pkg is installing I see: $ ls -l /Library/Frameworks/GHC.framework/Versions/ total 8 drwxrwxr-x 4 root admin 136 Aug 29 12:58 609 lrwxr-xr-x 1 root admin3 Aug 29 12:57 Current -> 608 (i.e. 608 has disappeared, but it isn't the whole GHC.framework that's been removed because the Current link is still there) and then when the installer has finished: $ ls -l /Library/Frameworks/GHC.framework/Versions/ total 8 drwxrwxr-x 4 root admin 136 Aug 29 12:58 609 lrwxr-xr-x 1 root admin3 Aug 29 12:57 Current -> 608 Thanks IAn ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: ANNOUNCE: GHC version 6.10.1 - MacOS installer
Jason Dagit: On Tue, Nov 4, 2008 at 10:11 AM, Ian Lynagh <[EMAIL PROTECTED]> wrote: How to get it ~ The easy way is to go to the web page, which should be self- explanatory: http://www.haskell.org/ghc/ We supply binary builds in the native package format for many platforms, and the source distribution is available from the same place. Packages will appear as they are built - if the package for your system isn't available yet, please try again later. I'm on OSX and I currently have ghc-6.6.1 and ghc-6.8.3 (installed from a pkg). I would like to add ghc-6.10.1 to my system. I tried to do this with RC1 of 6.10, but I found that it uninstalled my ghc-6.8.3. What will I need to do to get both 6.8.3 and 6.10.1? Are you sure it does deinstall the 6.8 compiler? Or does it just overwrite the symbolic links in /usr/bin? To check, have a look at /Library/Frameworks/GHC.framework/Versions After installing 6.10, there should be a 608/ and a 610/ directory. This certainly happens on my Mac and I am not aware of an option to change that behaviour. And while we are at it...a BIG FAT WARNING: If you installed the 6.10.200081007 pre-release installer package, uninstall that *before* installing the 6.10.1 package. For reasons, I don't understand, the installer otherwise half removes the old package, but doesn't seem to install the new one. Can a Mac expert shed any light on that behaviour? If you tried installing 6.10.1 before reading that, just remove the partial installation you are left with, and install again. Manuel ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: ANNOUNCE: GHC version 6.10.1
On Tue, Nov 4, 2008 at 10:11 AM, Ian Lynagh <[EMAIL PROTECTED]> wrote: > > How to get it > ~ > > The easy way is to go to the web page, which should be self-explanatory: > >http://www.haskell.org/ghc/ > > We supply binary builds in the native package format for many > platforms, and the source distribution is available from the same > place. > > Packages will appear as they are built - if the package for your > system isn't available yet, please try again later. I'm on OSX and I currently have ghc-6.6.1 and ghc-6.8.3 (installed from a pkg). I would like to add ghc-6.10.1 to my system. I tried to do this with RC1 of 6.10, but I found that it uninstalled my ghc-6.8.3. What will I need to do to get both 6.8.3 and 6.10.1? Thank you! Jason ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: ANNOUNCE: GHC version 6.10.1
Hello fellow GHC users, Ian Lynagh wrote: == The (Interactive) Glasgow Haskell Compiler -- version 6.10.1 == [snip] How to get it ~ The easy way is to go to the web page, which should be self-explanatory: http://www.haskell.org/ghc/ Gentoo Linux users can get it from the gentoo-haskell overlay[1]. If you're not familiar with this overlay (a gold mine for haskell hackers using gentoo), you can easily use layman[2] to get access. Make sure you have darcs installed, as it is a requirement for our overlay. Once layman is set up, add the overlay with: $ layman -a haskell Note that ghc-6.10.1 still is masked by keyword, and you need to unmask it first. If you're not familiar with how to do this, here's a quick guide: # make sure /etc/portage exists $ [[ -d /etc/portage ]] || mkdir /etc/portage # accept ghc being ~arch $ echo "dev-lang/ghc" >> /etc/portage/package.keywords # ghc requires the very latest libedit package $ echo "dev-libs/libedit" >> /etc/portage/package.keywords You may then install ghc-6.10.1 by saying: # this requires that you already have an older ghc version installed $ USE="ghcbootstrap -binary" emerge ghc The USE flags are required as we don't just yet provide the required binaries to bootstrap ghc. The command above requires that you already have a ghc version installed to bootstrap with. This version will be replaced with ghc-6.10.1 once the installation finishes. GHC binaries will follow shortly, which will shorten the procedure to: $ emerge ghc The packages from extralibs will also be available from the overlay. If you run into trouble, reply to the ml, or find us in #gentoo-haskell at freenode. Cheers, Lennart Kolmodin -- using his Gentoo Linux Developer hat [1] http://code.haskell.org/gentoo/gentoo-haskell/ [2] http://www.gentoo.org/proj/en/overlays/userguide.xml ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
ANNOUNCE: GHC version 6.10.1
== The (Interactive) Glasgow Haskell Compiler -- version 6.10.1 == The GHC Team is pleased to announce a new major release of GHC. There have been a number of significant changes since the last major release, including: * Some new language features have been implemented: * Record syntax: wild-card patterns, punning, and field disambiguation * Generalised quasi-quotes * Generalised list comprehensions * View patterns * Type families have been completely re-implemented * Now comes with Haddock 2, which supports all GHC extensions * Parallel garbage collection * Base provides extensible exceptions * The GHC API is easier to use * External core (output only) now works again * Data Parallel Haskell (DPH) comes as part of GHC The full release notes are here: http://haskell.org/ghc/docs/6.10.1/html/users_guide/release-6-10-1.html How to get it ~ The easy way is to go to the web page, which should be self-explanatory: http://www.haskell.org/ghc/ We supply binary builds in the native package format for many platforms, and the source distribution is available from the same place. Packages will appear as they are built - if the package for your system isn't available yet, please try again later. Background ~~ Haskell is a standard lazy functional programming language; the current language version is Haskell 98, agreed in December 1998 and revised December 2002. GHC is a state-of-the-art programming suite for Haskell. Included is an optimising compiler generating good code for a variety of platforms, together with an interactive system for convenient, quick development. The distribution includes space and time profiling facilities, a large collection of libraries, and support for various language extensions, including concurrency, exceptions, and foreign language interfaces (C, whatever). GHC is distributed under a BSD-style open source license. A wide variety of Haskell related resources (tutorials, libraries, specifications, documentation, compilers, interpreters, references, contact information, links to research groups) are available from the Haskell home page (see below). On-line GHC-related resources ~~ Relevant URLs on the World-Wide Web: GHC home page http://www.haskell.org/ghc/ GHC developers' home page http://hackage.haskell.org/trac/ghc/ Haskell home page http://www.haskell.org/ Supported Platforms ~~~ The list of platforms we support, and the people responsible for them, is here: http://hackage.haskell.org/trac/ghc/wiki/Contributors Ports to other platforms are possible with varying degrees of difficulty. The Building Guide describes how to go about porting to a new platform: http://hackage.haskell.org/trac/ghc/wiki/Building Developers ~~ We welcome new contributors. Instructions on accessing our source code repository, and getting started with hacking on GHC, are available from the GHC's developer's site run by Trac: http://hackage.haskell.org/trac/ghc/ Mailing lists ~ We run mailing lists for GHC users and bug reports; to subscribe, use the web interfaces at http://www.haskell.org/mailman/listinfo/glasgow-haskell-users http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs There are several other haskell and ghc-related mailing lists on www.haskell.org; for the full list, see http://www.haskell.org/mailman/listinfo/ Some GHC developers hang out on #haskell on IRC, too: http://www.haskell.org/haskellwiki/IRC_channel Please report bugs using our bug tracking system. Instructions on reporting bugs can be found here: http://www.haskell.org/ghc/reportabug ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: Control.Exception
On Tue, Nov 4, 2008 at 2:47 AM, Simon Marlow <[EMAIL PROTECTED]> wrote: > Jason Dagit wrote: >> Thanks. This helps a lot. Mind if I put it somewhere, such as on the >> wiki? > > A good description of how to deal with exceptions would be great to have in > the Haddock documentation for Control.Exception - would you (or someone > else) like to write and submit a patch? Or failing that, just putting it on > the wiki would be useful too. I don't mind submitting a patch. What is the URL of the repo I should download? Thanks! Jason ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: could ghci debugger search for free variables better?
Simon Marlow wrote: Peter Hercek wrote: As for as the rest of the message. Those are possible bugs. If I can reduce them to few tens of lines of a test, I'll post the bug reports. I use Archlinux and the last (non-testing) version of ghc there is ghc-6.8.2. Do you accept bug reports against it or do you need them against 6.10.1rc1 only? Bug reports against 6.8.2 are fine, but if you can test against 6.10.1 that's even better (it might weed out bugs that have been already fixed and thus save us some time). Here it is (against 6.8.2): http://hackage.haskell.org/trac/ghc/ticket/2740 Peter. ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: Control.Exception
On Tue, 04 Nov 2008 19:41:58 +0900, Duncan Coutts <[EMAIL PROTECTED]> wrote: >> >> action >> >> `catches` >> >>[ \(e :: ExitCode) -> ... >> >>, \(e :: PatternMatchFail) -> ... >> >>] >> >> >> >> or just by using multiple catch clauses: >> >> >> >> action >> >> `catch` (\(e :: ExitCode) -> ...) >> >> `catch` (\(e :: PatternMatchFail) -> ...) >> > >> > I don't think those are equivalent. In the second case, the >> > PatternMatchFail handler scopes over the ExitCode handler. >> >> I think Duncan forgot to write parens. According to Ian's example, >> here is an equivalent code. >> >> (action >> `catch` (\(e :: ExitCode) -> ...)) >> `catch` (\(e :: PatternMatchFail) -> ...) > > David is right. If the exit code handler throws a pattern match > exception then the code behaves differently than the `catches` version. I see. I misunderstood the problem. Thanks, -- shelarcy http://page.freett.com/shelarcy/ ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: No atomic read on MVar?
It is true that STM's TMVars (which are TVar (Maybe _)) allow atomic readTMVar. They are not a great replacement for MVars for serious performance reasons. MVars have "wake one" semantics: There can be many threads stopped and waiting on a particular MVar to be filled/emptied. These are actually in a FIFO queue. Filling or emptying it will cause the next thread in the FIFO queue to run, and leave the others to sleep. [1] TVars (and TMVars, and all STM threads) have "wake all" semantics: All threads which are stopped after a "retry" that are monitoring a particular TVar will be woken when the TVar is changed by the next STM commit. This will cause the "thundering herd" problem that plagued big Apache web servers with the original multi-process model [2]. To understand MVars and Simon's comments on the atomic read proposal I went and read the code in [3] to see it first hand. The putMVar# and tryPutMVar# operations, when a take operation is blocked, will perform the take operation and then wake the blocked thread. The takeMVar# and tryTakeMVar# do the reverse. So adding an atomicRead# operation would mean that on filling the MVar that all the atomicRead# that are waiting might need to be woken (or perhaps just those at the front of the FIFO). This is a fairly large change. The desire to atomically read an MVar could be expressed by (1) Use STM and lose the "wake one" performance (2) Use an (MVar ()) guarding the (MVar a) (3) Use an (MVar ()) guarding an (IORef a) Where (3) has a performance advantage to (2) and (3) is safe when only the right operations are exposed. I started looking at this with the opinion that "readMVar" and "withMVar" should have atomic semantics, i.e. edit PrimOps.cmm to add these operations. Now I am leaning to taking (3) and packaging this as a new module that exposes the safe operations. Cheers, Chris [1] http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Concurrent-MVar.html#v%3AtakeMVar [2] http://www.google.co.uk/search?q="thundering+herd"+apache [3] http://darcs.haskell.org/ghc/rts/PrimOps.cmm ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: Control.Exception
Jason Dagit wrote: On Mon, Nov 3, 2008 at 6:24 AM, Simon Marlow <[EMAIL PROTECTED]> wrote: Jason Dagit wrote: On Wed, Oct 8, 2008 at 1:19 AM, Simon Marlow <[EMAIL PROTECTED]> wrote: Johannes Waldmann wrote: with 6.10, the following does not typecheck: foo `Control.Exception.catch` \ _ -> return bar Ambiguous type variable `e' in the constraint: `Control.Exception.Exception e' It is probably bad programming style anyway but what is the workaround? As long as you're aware that it is bad programming style. We deliberately didn't include an easy way to do this, because we want people to think about why they need to catch *all* exceptions (most of the time it's a bug). Since the above is bad form, what should I be doing? Could someone please provide some examples or point me at the list of exceptions that I can catch? What about catching multiple types of exceptions? Let's distinguish two kinds of exception handling: Thanks. This helps a lot. Mind if I put it somewhere, such as on the wiki? A good description of how to deal with exceptions would be great to have in the Haddock documentation for Control.Exception - would you (or someone else) like to write and submit a patch? Or failing that, just putting it on the wiki would be useful too. Cheers, Simon ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: No atomic read on MVar?
On Mon, Nov 3, 2008 at 23:51, David Menendez <[EMAIL PROTECTED]> wrote: > On Mon, Nov 3, 2008 at 6:29 AM, Philip K.F. Hölzenspies > <[EMAIL PROTECTED]> wrote: >> >> I have now implemented my variable as a pair of MVars, one of which serves as >> a lock on the other. Both for performance reasons and for deadlock analysis, >> I would really like an atomic read on MVars, though. Does it exist? If not, >> why not? > > Have you considered using STM? All the operations on TMVars are atomic. I will second this. At the very least, if you only need atomic read/write operations you can use TMVars and make aliases that compose with atomically: takeMVar = atomically . takeTMVar putMVar = atomically . putTMVar etc. cheers, Arnar ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: could ghci debugger search for free variables better?
Peter Hercek wrote: As for as the rest of the message. Those are possible bugs. If I can reduce them to few tens of lines of a test, I'll post the bug reports. I use Archlinux and the last (non-testing) version of ghc there is ghc-6.8.2. Do you accept bug reports against it or do you need them against 6.10.1rc1 only? Bug reports against 6.8.2 are fine, but if you can test against 6.10.1 that's even better (it might weed out bugs that have been already fixed and thus save us some time). Cheers, Simon ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users