Re: [Haskell-cafe] Build regressions due to GHC 7.6

2012-08-30 Thread MightyByte
Interesting data point. I think my initial thoughts can be summarized with the suggestion that this thread would be better served by a little irony and a new subject: Reuse Considered Harmful. On Thu, Aug 30, 2012 at 1:26 AM, Bryan O'Sullivan b...@serpentine.comwrote: Since the release of the

[Haskell-cafe] Darcs fetches too little files

2012-08-30 Thread Ramana Kumar
On Aug 29, 2012 10:56 PM, Henk-Jan van Tuyl hjgt...@chello.nl wrote: On Wed, 29 Aug 2012 23:10:24 +0200, Stefan Monnier monn...@iro.umontreal.ca wrote: Albert Einstein said: Insanity: doing the same thing over and over again and expecting different results. I repeated the command today

Re: [Haskell-cafe] Build regressions due to GHC 7.6

2012-08-30 Thread Ivan Lazar Miljenovic
On 30 August 2012 15:26, Bryan O'Sullivan b...@serpentine.com wrote: The reasons for these problems fall into three bins: Prelude no longer exports catch, so a lot of import Prelude hiding (catch) had to change. It looks like this might be fixed before the release:

Re: [Haskell-cafe] Build regressions due to GHC 7.6

2012-08-30 Thread Richard O'Keefe
On 30/08/2012, at 5:26 PM, Bryan O'Sullivan wrote: The reasons for these problems fall into three bins: • Prelude no longer exports catch, so a lot of import Prelude hiding (catch) had to change. This could have been avoided if import module hiding (importables) were

Re: [Haskell-cafe] A first glimps on the {-# NOUPDATE #-} pragma

2012-08-30 Thread Joachim Breitner
Hi, Am Mittwoch, den 29.08.2012, 17:16 +0100 schrieb Thomas Schilling: Syntactically, I'd prefer something that looks more like a function. With a pragma it's difficult to see what expression it actually affects. For example, we already have the special functions lazy and inline. Since

Re: [Haskell-cafe] Build regressions due to GHC 7.6

2012-08-30 Thread Erik Hesselink
On Thu, Aug 30, 2012 at 7:26 AM, Bryan O'Sullivan b...@serpentine.com wrote: The FFI now requires constructors to be visible, so CInt has to be imported as CInt(..). I think there was already a warning about this one in GHC 7.4, so there was more time to fix it. Not to say I don't feel your

Re: [Haskell-cafe] Build regressions due to GHC 7.6

2012-08-30 Thread Alexander Kjeldaas
This is very unfortunate, but this is crucially a tooling issue. I am going to wave my hands, but.. Ignore the mapreduce in the following video, but look at the use of clang to do automatic refactoring of C++. This is *incredibly* powerful in dealing with updates to APIs.

Re: [Haskell-cafe] Build regressions due to GHC 7.6

2012-08-30 Thread Alexander Bernauer
Hi I agree that automatic code migration can solve this issue in large parts. The Python folks have done this to mitigate the transition from version 2 to version 3 [1]. On Thu, Aug 30, 2012 at 03:03:05PM +0200, Alexander Kjeldaas wrote: perl -ni -e 'print unless /import Prelude hiding

Re: [Haskell-cafe] Build regressions due to GHC 7.6

2012-08-30 Thread Alexander Kjeldaas
On 30 August 2012 15:34, Alexander Bernauer alex-hask...@copton.net wrote: Hi I agree that automatic code migration can solve this issue in large parts. The Python folks have done this to mitigate the transition from version 2 to version 3 [1]. On Thu, Aug 30, 2012 at 03:03:05PM +0200,

Re: [Haskell-cafe] Build regressions due to GHC 7.6

2012-08-30 Thread Erik Hesselink
Note that this does not work if you want to support multiple versions of GHC, and might not work in general, since * The hiding of catch is needed for preludes that still have it, since otherwise it will probably conflict with the one from Control.Exception. * Older versions do not have

Re: [Haskell-cafe] [Haskell] ANNOUNCE: Perdure

2012-08-30 Thread Felipe Almeida Lessa
[moving discussion to haskell-cafe] Congratulations and thanks for your new open source contribution! I hope you feel at home =). Your library looks really interesting but I'm completely overwhelmed by its size. Its Cabal description is huge and there's no example of how to use the library (it

Re: [Haskell-cafe] Build regressions due to GHC 7.6

2012-08-30 Thread wren ng thornton
On 8/30/12 10:26 AM, Erik Hesselink wrote: Note that this does not work if you want to support multiple versions of GHC, and might not work in general, since * The hiding of catch is needed for preludes that still have it, since otherwise it will probably conflict with the one from

[Haskell-cafe] happstack simpleHTTP state monad

2012-08-30 Thread Corentin Dupont
Hi all, I'm trying to make a web server that manages its own state. The user can issue commands that modifies the state. I did like below but unfortunatly the state is not keep after a command is issued... What is the right way to do it? Is there any example sites with an internal state with

[Haskell-cafe] paths in .cabal/config

2012-08-30 Thread Semen Trygubenko
Dear Haskell-Cafe, I am wondering if there is a way to use variables in paths that appear in .cabal/config file? I have written a custom config file that I would like to share. However, my config file contains full paths s.a. world-file: /home/semen/.cabal/world etc. Is there any way I could

Re: [Haskell-cafe] Build regressions due to GHC 7.6

2012-08-30 Thread Michael Sloan
A good way to specify such refactorings is as a Haskell module. For example: module PreludePre_7_6 where import Prelude hiding ( catch ) Or, an example of avoiding the Eq / Show / Num debacle: module PreludePre_7_4 (module Prelude, Num) where import Prelude hiding ( Num ) import qualified

Re: [Haskell-cafe] Build regressions due to GHC 7.6

2012-08-30 Thread Michael Sloan
Whoops, I messed up that first example: module PreludePre_7_6 (module Prelude, catch) where import Prelude import qualified System.IO.Error as E catch = E.catch On Thu, Aug 30, 2012 at 12:16 PM, Michael Sloan mgsl...@gmail.com wrote: A good way to specify such refactorings is as a Haskell

Re: [Haskell-cafe] Build regressions due to GHC 7.6

2012-08-30 Thread Erik Hesselink
On Thu, Aug 30, 2012 at 7:24 PM, wren ng thornton w...@freegeek.org wrote: On 8/30/12 10:26 AM, Erik Hesselink wrote: * Packages might not work with the new bytestring version, since the API has breaking changes (although they're supposed to be minor). For the first two, you need to add some

Re: [Haskell-cafe] happstack simpleHTTP state monad

2012-08-30 Thread Erik Hesselink
The way you wrote it, you run the state transformer once for each request. So the state will be available within a single request, but not between requests. If you want to persist state between requests, you can use one the the mutable variables available (TVar or MVar are good choices; IORefs

[Haskell-cafe] why do I need class context in declaring data constructor?

2012-08-30 Thread Paul Liu
I had a toy program that encodes simply typed lambda in types. It used to work fine with GHC prior to 7.2. But now it no longer compiles. Here is a minimal fragment that demonstrates this problem. {-# LANGUAGE GADTs, MultiParamTypeClasses, FlexibleInstances, FlexibleContexts #-}

Re: [Haskell-cafe] Build regressions due to GHC 7.6

2012-08-30 Thread Jay Sulzberger
On Thu, 30 Aug 2012, Alexander Kjeldaas alexander.kjeld...@gmail.com wrote: This is very unfortunate, but this is crucially a tooling issue. I am going to wave my hands, but.. Ignore the mapreduce in the following video, but look at the use of clang to do automatic refactoring of C++. This

Re: [Haskell-cafe] happstack simpleHTTP state monad

2012-08-30 Thread Corentin Dupont
Hi Erik, yes you're right, I'm experimenting with an IORef now (a TVar would be a better idea). I also tried the idea expressed here, to keep the state: https://groups.google.com/forum/?fromgroups=#!msg/happs/_JSpaJKub0k/oa0K01IBlh0J But without success so far. The server is returning me the state

Re: [Haskell-cafe] A first glimps on the {-# NOUPDATE #-} pragma

2012-08-30 Thread Thomas Schilling
On 30 August 2012 09:34, Joachim Breitner breit...@kit.edu wrote: but from a first glance it seems that you are not using that part of GHC in your project, right? No, I don't think I can make use of your work directly. Lambdachine uses GHC up until the CorePrep phase (the last phase before

Re: [Haskell-cafe] createProcess running non-existent programs

2012-08-30 Thread Niklas Hambüchen
Well, overhead or not, it would be nice to at least have *some* solution. Currently, it just doesn't work. I am sure that as soon the functionality is there, somebody will step in to fake it fast. On 15/08/12 06:25, Donn Cave wrote: Quoth Alexander Kjeldaas alexander.kjeld...@gmail.com, See

[Haskell-cafe] Function names in Haskell lib not first-class on web!

2012-08-30 Thread damodar kulkarni
Hi Cafe, It seems, the function names in Haskell libs are not first-class objects, AT LEAST when it comes to searching for them of the net! I was trying to search for the following Haskell functions in the mailing list archives. Here is a summary of the responses I have had from various servers

Re: [Haskell-cafe] Function names in Haskell lib not first-class on web!

2012-08-30 Thread Kristopher Micinski
On Thu, Aug 30, 2012 at 11:21 PM, damodar kulkarni kdamodar2...@gmail.com wrote: Hi Cafe, It seems, the function names in Haskell libs are not first-class objects, AT LEAST when it comes to searching for them of the net! I was trying to search for the following Haskell functions in the mailing

[Haskell-cafe] Sliding Window functional data structure

2012-08-30 Thread Richard O'Keefe
Consider the following interface type Ord k = Sliding_Window k v entries :: Sliding_Window k v - [(k,v)] The cost is expected to be linear in the length of the result. The pairs are listed in increasing order of k. add :: Ord k = k -