[Haskell-cafe] Recompiling Hackage to estimate the impact of a change [Was: StricterLabelledFieldSyntax]

2009-07-26 Thread Johan Tibell
On Sun, Jul 26, 2009 at 3:34 AM, Ian Lynagh ig...@earth.li wrote: Hi all, I've made a ticket and proposal page for making the labelled field syntax stricter, e.g. making this illegal: data A = A {x :: Int} y :: Maybe A y = Just A {x = 5} and requiring this instead: data A

Re: [Haskell-cafe] Recompiling Hackage to estimate the impact of a change [Was: StricterLabelledFieldSyntax]

2009-07-26 Thread Don Stewart
johan.tibell: In general, I think it would be a good idea to provide some statistics of how many packages would break as the result of a backwards incompatible change. Without that data I find it hard to do a cost-benefit analysis. So I hereby suggest that we make a recompile of Hackage a

[Haskell-cafe] Re: Recompiling Hackage to estimate the impact of a change [Was: StricterLabelledFieldSyntax]

2009-07-26 Thread Maurí­cio
In general, I think it would be a good idea to provide some statistics of how many packages would break as the result of a backwards incompatible change. Agreed. And it should be required as part of release processes for GHC. One possible alternative, or complementary, action would be

Re: [Haskell-cafe] Recompiling Hackage to estimate the impact of a change [Was: StricterLabelledFieldSyntax]

2009-07-26 Thread Ian Lynagh
On Sun, Jul 26, 2009 at 08:21:00AM +0200, Johan Tibell wrote: On Sun, Jul 26, 2009 at 3:34 AM, Ian Lynagh ig...@earth.li wrote: http://hackage.haskell.org/trac/haskell-prime/wiki/StricterLabelledFieldSyntax In general, I think it would be a good idea to provide some statistics of how

Re: [Haskell-cafe] Recompiling Hackage to estimate the impact of a change [Was: StricterLabelledFieldSyntax]

2009-07-26 Thread Ian Lynagh
On Sat, Jul 25, 2009 at 11:25:12PM -0700, Donald Bruce Stewart wrote: johan.tibell: In general, I think it would be a good idea to provide some statistics of how many packages would break as the result of a backwards incompatible change. Agreed. And it should be required as part of

Re: [Haskell-cafe] Pattern matching with where free variables can be used more than once

2009-07-26 Thread Christopher Done
Well, as I said previously, in reply to Wolfgang, forget the (==) and/or Eq instance; just use the constructors. You don't need an Eq instance for them. You have the expression: foo (a,b) and the definition: foo (X,X) = .. Let's say the predicate for checking that the value of `a' matches X

[Haskell-cafe] ANN: haskell-src-exts-1.1.0

2009-07-26 Thread Niklas Broberg
Fellow Haskelleers, I'm pleased to announce the release of haskell-src-exts-1.1.0, bringing you tuple sections, comments, and a few bug fixes. haskell-src-exts is a package for Haskell source code manipulation. In particular it defines an abstract syntax tree representation, and a parser and

Re: [Haskell-cafe] Recompiling Hackage to estimate the impact of a change [Was: StricterLabelledFieldSyntax]

2009-07-26 Thread Johan Tibell
On Sun, Jul 26, 2009 at 5:24 PM, Ian Lynagh ig...@earth.li wrote: On Sun, Jul 26, 2009 at 08:21:00AM +0200, Johan Tibell wrote: On Sun, Jul 26, 2009 at 3:34 AM, Ian Lynagh ig...@earth.li wrote: http://hackage.haskell.org/trac/haskell-prime/wiki/StricterLabelledFieldSyntax In

[Haskell-cafe] Data.Binary.encode slower than show

2009-07-26 Thread Grzegorz Chrupała
Hi all, I have a piece of code where I'm serializing a datastructure with the following type [(Int, (Map DType (IntMap Int)))], using Binary.encode The thing is it is very slow: actually quite a bit slower than just using show. This seems rather suspicious. Any idea what could be going on? import

[Haskell-cafe] ANN: Elerea version 1.x.x

2009-07-26 Thread Patai Gergely
Hi all, Having taken a short break from my profiling project, I updated my little FRP library called Elerea [1] along with the runnable example programs [2]. The interface was changed into a monadic-applicative hybrid that distinguishes stateful and stateless combinators for safety reasons. Since

[Haskell-cafe] TBC: Testing By Convention

2009-07-26 Thread Peter Gammie
Hello, Mark and I would like to announce our test harness, which has features complementary to existing harnesses. TBC provides two main features: - It attempts to compile and run all tests, even if some do not compile or run. - Aspiring to the write-it-once principle, tests following

[Haskell-cafe] Is a bug?

2009-07-26 Thread Linker
Hi,All! I find out that diff between GHC and Hugs: GHC: *Prelude sqrt 3+4+9 14.732050807568877 Prelude sqrt 16 4.0 Prelude sqrt $3+4+9 14.732050807568877* Hugs:*Hugs sqrt $ 3+4+9* *4.0* *Hugs sqrt 3+4+9* *14.7320508075689* Which one is right? Thanks. -- Regards, Linker Lin

[Haskell-cafe] Re: Is a bug?

2009-07-26 Thread Linker
Sorry.I defined a function : *GHCi, version 6.10.3: http://www.haskell.org/ghc/ :? for help* *Loading package ghc-prim ... linking ... done.* *Loading package integer ... linking ... done.* *Loading package base ... linking ... done.* *Prelude sqrt $ 3 + 4 + 9* *4.0* *Prelude let f $ x = f x*

Re: [Haskell-cafe] Re: Is a bug?

2009-07-26 Thread Dan Doel
On Sunday 26 July 2009 10:54:53 pm Linker wrote: Sorry.I defined a function : *GHCi, version 6.10.3: http://www.haskell.org/ghc/ :? for help* *Loading package ghc-prim ... linking ... done.* *Loading package integer ... linking ... done.* *Loading package base ... linking ... done.*

[Haskell-cafe] A Question of Restriction

2009-07-26 Thread Brian Troutwine
Hello all. I would like to define a data type that is the super-set of several types and then each of the proper subset types. For example: data Foo = One | Two | Three | Four data Odd = One | Three data Even = Two | Four This, of course, does not work. It seems that such a thing

Re: [Haskell-cafe] A Question of Restriction

2009-07-26 Thread Ross Mellgren
I've seen this expressed with GADTs (which I guess many things can), though I'm not sure if it's the best way, and I'm no type system wizard. If I recall correctly, this use is normally called phantom types. {-# LANGUAGE EmptyDataDecls, GADTs #-} data Even data Odd data Foo a where

Re: [Haskell-cafe] A Question of Restriction

2009-07-26 Thread Felipe Lessa
On Sun, Jul 26, 2009 at 09:01:22PM -0700, Brian Troutwine wrote: Hello all. I would like to define a data type that is the super-set of several types and then each of the proper subset types. For example: data Foo = O !Odd | E !Even data Odd = One | Three data Even = Two | Four

Re: [Haskell-cafe] TBC: Testing By Convention

2009-07-26 Thread Alexander Dunlap
On Sun, Jul 26, 2009 at 6:12 PM, Peter Gammiepete...@gmail.com wrote: Hello, Mark and I would like to announce our test harness, which has features complementary to existing harnesses. TBC provides two main features: - It attempts to compile and run all tests, even if some do not compile or

Re: [Haskell-cafe] A Question of Restriction

2009-07-26 Thread Brian Troutwine
Do you have any reason not to do the above? Yes, the subset types that I wish to define are not clean partitions, though my example does suggest this. Let's say that the definition of Foo is now data Foo = One | Two | Three | Four | Five | Six while Odd and Even remain the same. I would

[Haskell-cafe] Re: A Question of Restriction

2009-07-26 Thread Ahn, Ki Yung
Brian Troutwine wrote: Hello all. I would like to define a data type that is the super-set of several types and then each of the proper subset types. For example: data Foo = One | Two | Three | Four data Odd = One | Three data Even = Two | Four This, of course, does not work. It

Re: [Haskell-cafe] TBC: Testing By Convention

2009-07-26 Thread Peter Gammie
On 27/07/2009, at 2:26 PM, Alexander Dunlap wrote: Can it return an exit status based on whether or not all tests passed? If not, that would be a very useful feature that I have not seen in any other testing frameworks. It could, and that's probably true of the other harnesses out there. The