Re: [Haskell-cafe] Re: ANNOUNCE: GotoT-transformers version 1.0

2010-09-11 Thread Gregory Crosswhite
On 9/11/10 10:36 PM, Ertugrul Soeylemez wrote: It should print the string, if the computation isn't aborted, i.e. if the last continuation, which you specify as an argument to runContT is reached. Greets, Ertugrul That's true, it just seems to me like at that point the spirit of the cont

[Haskell-cafe] Re: ANNOUNCE: GotoT-transformers version 1.0

2010-09-11 Thread Ertugrul Soeylemez
Gregory Crosswhite wrote: > Okay, where that unpost button when I need it... :-) > > So, I hadn't noticed that the script that I copied and pasted didn't > even compile because I was pressing "up enter" at the console to run > it, but had forgotten that I was now working with a script with a n

Re: [Haskell-cafe] Re: ANNOUNCE: GotoT-transformers version 1.0

2010-09-11 Thread Gregory Crosswhite
Okay, where that unpost button when I need it... :-) So, I hadn't noticed that the script that I copied and pasted didn't even compile because I was pressing "up enter" at the console to run it, but had forgotten that I was now working with a script with a new name and so all I was doing was

Re: [Haskell-cafe] Re: ANNOUNCE: GotoT-transformers version 1.0

2010-09-11 Thread Gregory Crosswhite
To recover from my overly complex previous post, here is a much simply goto based on existing monad transformers: goto :: Monad m => ContT r m r -> ContT r m a goto (ContT m) = ContT $ \_ -> m return That doesn't actually work, though. Try running the following script:

Re: [Haskell-cafe] A new cabal odissey: cabal-1.8 breaking its own neck by updating its dependencies

2010-09-11 Thread wren ng thornton
On 9/11/10 3:43 PM, Daniel Fischer wrote: - is there a "specification" of which are the "core" packages? "core" as in *do not update*? Basically, what comes with GHC shouldn't be updated. Though I heard updating Cabal was okay. I tried updating Cabal once (recently) and it broke things in the

[Haskell-cafe] Fwd: Type families - how to resolve ambiguities?

2010-09-11 Thread Paolo Giarrusso
On Aug 25, 11:22 pm, Dan Doel wrote: > On Wednesday 25 August 2010 5:05:11 pm DavidA wrote: > > The code below defines a type synonym family: > > > {-# LANGUAGE MultiParamTypeClasses, TypeFamilies #-} > > {-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} [snip] > The problem with mult is

Re: [Haskell-cafe] A new cabal odissey: cabal-1.8 breaking its own neck by updating its dependencies

2010-09-11 Thread Paolo Giarrusso
A further pitfall I just discovered: $ cabal install --dry cabal-install leksah-0.8.0.6 Resolving dependencies... cabal: cannot configure cabal-install-0.8.2. It requires Cabal ==1.8.* For the dependency on Cabal ==1.8.* there are these packages: Cabal-1.8.0.2, Cabal-1.8.0.4 and Cabal-1.8.0.6. How

Re: [Haskell-cafe] A new cabal odissey: cabal-1.8 breaking its own neck by updating its dependencies

2010-09-11 Thread Paolo Giarrusso
On Sat, Sep 11, 2010 at 21:17, Jason Dagit wrote: > On Sat, Sep 11, 2010 at 11:56 AM, Thomas DuBuisson > wrote: > >>> - is there a "specification" of which are the "core" packages? > From the FAQ linked by Paolo: > > http://www.haskell.org/cabal/FAQ.html#dependencies-conflict > > "To avoid this

Re: [Haskell-cafe] A new cabal odissey: cabal-1.8 breaking its own neck by updating its dependencies

2010-09-11 Thread Paolo Giarrusso
On Sat, Sep 11, 2010 at 22:29, Paolo Giarrusso wrote: > On Sat, Sep 11, 2010 at 21:43, Daniel Fischer > wrote: >>> I had a broken dependency which I could see with "grep" but not >>> otherwise. > >> ghc-pkg check? > > I tried that, but it didn't notice any breakage. > As far as I > understand,

Re: [Haskell-cafe] A new cabal odissey: cabal-1.8 breaking its own neck by updating its dependencies

2010-09-11 Thread Paolo Giarrusso
Hi all, sadly, I can't post all details. I just got a kernel panic and only parts of the detailed log were saved - my bad (but this is something that kind-of never happens, except, by Murphy's law, now). I could try reproducing it another time, but it took some time, so for now I'll rely on my mem

Re: [Haskell-cafe] A new cabal odissey: cabal-1.8 breaking its own neck by updating its dependencies

2010-09-11 Thread Paolo Giarrusso
On Sat, Sep 11, 2010 at 21:43, Daniel Fischer wrote: > On Saturday 11 September 2010 20:38:21, Paolo Giarrusso wrote: >> Hi, >> after Andrew Coppin's odissey [1], I also had a few problem with >> cabal, which stopped installing new packages. Details will follow; >> meanwhile, here are some questio

[Haskell-cafe] Re: Haskell web developer position at CREATE-NET

2010-09-11 Thread Chris Done
Here at CREATE-NET, a research center located in Trento, Italy, we have a position open for a web developer. The following are essential: 1. Experience writing standard-compliant, semantic and accessible web documents with (X)HTML/CSS2. 2. Strong JavaScript experience. 3. Experience with cross-b

Re: [Haskell-cafe] Glade problem solved Was: Compile Glade apps (MS Windows system) Was: Re: Trying to compile Glade Gtk2Hs demo / cabal install glade problem

2010-09-11 Thread Daniel Kahlenberg
Hi list again, I'm happy to tell you the solution at least to my install problem: ??? is synonym for D:/Programme/Gtk+ on my example setup. Download glade3-3.6.7-with-GTK+.exe (http://ftp.gnome.org/pub/GNOME/binaries/win32/glade3/3.6/glade3-3.6.7-with-GTK+.exe) Install. Download libxml2_2.7

Re: [Haskell-cafe] Cost: (:) vs head

2010-09-11 Thread michael rice
With Haskell, there's always something new to learn, and on haskell-cafe there are always patient people to assist in that endeavor. Thanks, all. Michael --- On Sat, 9/11/10, Jason Dagit wrote: From: Jason Dagit Subject: Re: [Haskell-cafe] Cost: (:) vs head To: "michael rice" Cc: haskell-ca

Re: [Haskell-cafe] record update

2010-09-11 Thread Stephen Tetley
On 11 September 2010 20:45, Henning Thielemann wrote: > It uses the Applicative instance for functions. Yep - I meant that, but somehow didn't write it, then pressed the send button... ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.h

Re: [Haskell-cafe] record update

2010-09-11 Thread Henning Thielemann
On Sat, 11 Sep 2010, Stephen Tetley wrote: On 11 September 2010 18:21, Jonathan Geddes wrote: someUpdate :: MyRecord -> MyRecord someUpdate myRecord = myRecord     { field1 = f $ field1 myRecord     , field2 = g $ field2 myRecord     , field3 = h $ filed3 myRecord     } Applicatively, usin

Re: [Haskell-cafe] A new cabal odissey: cabal-1.8 breaking its own neck by updating its dependencies

2010-09-11 Thread Daniel Fischer
On Saturday 11 September 2010 20:38:21, Paolo Giarrusso wrote: > Hi, > after Andrew Coppin's odissey [1], I also had a few problem with > cabal, which stopped installing new packages. Details will follow; > meanwhile, here are some questions prompted by what happened: > > - when recompiling a packa

Re: [Haskell-cafe] record update

2010-09-11 Thread Henning Thielemann
On Sat, 11 Sep 2010, Jonathan Geddes wrote: On Sat, Sep 11, 2010 at 11:53 AM, Henning Thielemann data-accessor and similar packages may become your friends. data-accessor allows you to write: someUpdate =   (field1 ^: f) .   (field2 ^: g) .   (field3 ^: h) data-accessor is a pretty cool

Re: [Haskell-cafe] record update

2010-09-11 Thread Stephen Tetley
On 11 September 2010 18:21, Jonathan Geddes wrote: >>someUpdate :: MyRecord -> MyRecord >>someUpdate myRecord = myRecord >>     { field1 = f $ field1 myRecord >>     , field2 = g $ field2 myRecord >>     , field3 = h $ filed3 myRecord >>     } Applicatively, using no additional libraries, is how

Re: [Haskell-cafe] record update

2010-09-11 Thread Jonathan Geddes
On Sat, Sep 11, 2010 at 11:53 AM, Henning Thielemann wrote: > Jonathan Geddes schrieb: >> I know that record updates is a topic that has become a bit of a dead >> horse, but here I go anyway: >> >> I find that most of the record updates I read and write take the form >> >>> someUpdate :: MyRecord

Re: [Haskell-cafe] A new cabal odissey: cabal-1.8 breaking its own neck by updating its dependencies

2010-09-11 Thread Jason Dagit
On Sat, Sep 11, 2010 at 11:56 AM, Thomas DuBuisson wrote: >> - is there a "specification" of which are the "core" packages? > > Are there packages on which the community standardizes?  That's the > goal of Haskell-Platform [1], but I don't place any special value in a > package being in HP yet -

Re: [Haskell-cafe] Cost: (:) vs head

2010-09-11 Thread Jason Dagit
On Sat, Sep 11, 2010 at 7:10 AM, michael rice wrote: > Hi Baz, > > That's quite an analysis, one I'll keep for future reference. > > So, my original coding was the fastest. Guess I should stop second guessing > myself. ;-) > I think Bas's point was actually that you should second guess yourself

Re: [Haskell-cafe] A new cabal odissey: cabal-1.8 breaking its own neck by updating its dependencies

2010-09-11 Thread Thomas DuBuisson
> - when recompiling a package with ABI changes, does cabal always > update dependent packages? If Foo depends on Bar and there is a new version of Foo that specifies a newer version of Bar then yes, the newer library being depended on will be build too (out of necessity). OTOH, if you are buildi

[Haskell-cafe] A new cabal odissey: cabal-1.8 breaking its own neck by updating its dependencies

2010-09-11 Thread Paolo Giarrusso
Hi, after Andrew Coppin's odissey [1], I also had a few problem with cabal, which stopped installing new packages. Details will follow; meanwhile, here are some questions prompted by what happened: - when recompiling a package with ABI changes, does cabal always update dependent packages? It seems

Re: [Haskell-cafe] Disable LINE Pragma handling in GHC

2010-09-11 Thread Henning Thielemann
JP Moresmau schrieb: > Hello fellow Haskellers, > > In EclipseFP we use the GHC API for IDE related stuff like syntax > highlighting and code outlines. However, I ran into something funny > yesterday: when a source file contains LINE pragmas > (http://www.haskell.org/ghc/docs/6.12.2/html/users_gui

Re: [Haskell-cafe] record update

2010-09-11 Thread Henning Thielemann
Jonathan Geddes schrieb: > I know that record updates is a topic that has become a bit of a dead > horse, but here I go anyway: > > I find that most of the record updates I read and write take the form > >> someUpdate :: MyRecord -> MyRecord >> someUpdate myRecord = myRecord >> { field1 = f $

Re: [Haskell-cafe] ANN: ecu-0.0.0

2010-09-11 Thread Henning Thielemann
Stephen Tetley schrieb: > On 10 September 2010 05:11, Tom Hawkins wrote: > >> Another question: Can we get a Hackage category specifically for the >> use of Haskell in embedded systems? I didn't see anything that stood >> out. >> > > Hi Tom > > Don't you just pick a category yourself in the Ca

Re: [Haskell-cafe] ANN: ecu-0.0.0

2010-09-11 Thread Henning Thielemann
Brent Yorgey schrieb: > You want conditional configurations in the .cabal file. See > > > http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/authors.html#configurations > > For the OS issue you can do something like > > if os(windows) > Build-depends: canlib-windows >

[Haskell-cafe] record update

2010-09-11 Thread Jonathan Geddes
I know that record updates is a topic that has become a bit of a dead horse, but here I go anyway: I find that most of the record updates I read and write take the form >someUpdate :: MyRecord -> MyRecord >someUpdate myRecord = myRecord > { field1 = f $ field1 myRecord > , field2 = g $ fi

[Haskell-cafe] Fwd: Announcement: Pearls of Functional Algorithm Design

2010-09-11 Thread Don Stewart
- Forwarded message from Richard - To: hask...@haskell.org Subject: [Haskell] Announcement My book "Pearls of Functional Algorithm Design" will be published by CUP this month. See http://www.comlab.ox.ac.uk/news/237-full.html Richard Bird - End forwarded message - For tho

Re: [Haskell-cafe] Cost: (:) vs head

2010-09-11 Thread Bas van Dijk
On Sat, Sep 11, 2010 at 4:16 PM, Daniel Fischer wrote: > ... > I don't pretend to understand at the processor level why f4's loop is > faster that f2's and f3's, but I've observed on several occasions that > parameter order plays a big rôle for performance. Apart from the rule to > order them in i

Re: [Haskell-cafe] Cost: (:) vs head

2010-09-11 Thread Daniel Fischer
On Saturday 11 September 2010 14:46:48, Bas van Dijk wrote: > On Sat, Sep 11, 2010 at 5:13 AM, michael rice wrote: > > Which of these would be more costly for a long list? > > > > f :: [Int] -> [Int] > > f [x] = [x] > > f (x:xs) = x + (head xs) : f xs > > > > f :: [Int] -> [Int] > > f [x] = [x] >

Re: [Haskell-cafe] Cost: (:) vs head

2010-09-11 Thread michael rice
Hi Baz, That's quite an analysis, one I'll keep for future reference. So, my original coding was the fastest. Guess I should stop second guessing myself. ;-) Michael --- On Sat, 9/11/10, Bas van Dijk wrote: From: Bas van Dijk Subject: Re: [Haskell-cafe] Cost: (:) vs head To: "michael rice"

Re: [Haskell-cafe] Relative files paths

2010-09-11 Thread Daniel Fischer
On Saturday 11 September 2010 13:20:08, Andrew Coppin wrote: > Suppose that I'm in foo/bar/box1/top and I want to access a file in > foo/bar/box2/side. How do I construct the shortest possible relative > path from one to the other? > The filepath package doesn't seem to provide > a function to do t

Re: [Haskell-cafe] Cost: (:) vs head

2010-09-11 Thread Bas van Dijk
On Sat, Sep 11, 2010 at 5:13 AM, michael rice wrote: > > Which of these would be more costly for a long list? > > f :: [Int] -> [Int] > f [x] = [x] > f (x:xs) = x + (head xs) : f xs > > f :: [Int] -> [Int] > f [x] = [x] > f (x:y:xs) = x + y : f (y:xs) Use Criterion[1] to find out: module Main w

[Haskell-cafe] Relative files paths

2010-09-11 Thread Andrew Coppin
Suppose that I'm in foo/bar/box1/top and I want to access a file in foo/bar/box2/side. How do I construct the shortest possible relative path from one to the other? The filepath package doesn't seem to provide a function to do this. (The correct answer is obviously "../../box2/side" in this ins

Re: [Haskell-cafe] Haddock again

2010-09-11 Thread Andrew Coppin
Andrew Coppin wrote: After much experimentation, I have discovered that if you have a sufficiently new version of cabal-install, the configuration file has a field entitled "document-index:" or similar. If you uncomment this and use its default value, you get a documentation index generated for

[Haskell-cafe] Re: ANNOUNCE: AbortT-transformers version 1.0

2010-09-11 Thread Ertugrul Soeylemez
Brandon S Allbery KF8NH wrote: > On 9/9/10 12:16 , Henning Thielemann wrote: > > Colin Paul Adams schrieb: > > > >> It seems to me that you want to get rid of the notion of an > >> exception as something exceptional, in which case it would be > >> better to give it a different name. > > > > Engli

[Haskell-cafe] Haddock again

2010-09-11 Thread Andrew Coppin
Some time ago (I can't find the thread now), I wrote about the fun and games I had with Haddock. After much experimentation, I have discovered that if you have a sufficiently new version of cabal-install, the configuration file has a field entitled "document-index:" or similar. If you uncommen