Re: [Haskell-cafe] Re: could we get a Data instance for Data.Text.Text?

2010-01-30 Thread Bryan O'Sullivan
On Tue, Jan 26, 2010 at 10:08 AM, Jeremy Shaw wrote: > > I think so... none of the other instances do.. but I guess that is not a > very good excuse :) > Send me a final darcs patch, and I'll apply it. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell

[Haskell-cafe] Re: C functional programming techniques?

2010-01-30 Thread Maurí­cio CA
>> Sorry if this looks weird, but do you know of experiences with >> functional programming, or "type programming", with C? > I would use a higher level language to emit valid C. Basically, > use a strongly typed macro language. "All" you will have to > prove is that your emitter produces type sa

Re: [Haskell-cafe] Strange random choice algorithm

2010-01-30 Thread michael rice
Hi all, Very nice analysis, Sebastian. Thanks, Michael --- On Sat, 1/30/10, Sebastian Fischer wrote: From: Sebastian Fischer Subject: Re: [Haskell-cafe] Strange random choice algorithm To: "haskell-cafe Cafe" Date: Saturday, January 30, 2010, 6:06 PM On Jan 30, 2010, at 8:59 PM, michael r

Re: [Haskell-cafe] C functional programming techniques?

2010-01-30 Thread Alexander Solla
On Jan 29, 2010, at 9:11 AM, Maurí cio CA wrote: Sorry if this looks weird, but do you know of experiences with functional programming, or "type programming", with C? Using macro tricks or just good specifications? I know this is not absurd to a small extent. I've heard of proof tool certifi

Re: [Haskell-cafe] Strange random choice algorithm

2010-01-30 Thread Sebastian Fischer
On Jan 30, 2010, at 8:59 PM, michael rice wrote: I'm not sure where I got this PICK function from, and don't understand why it's written as it is, so I wanted to test it for randomness. It seems random enough. We can convince ourselves using reason instead of tests. An element is selecte

Re: [Haskell-cafe] Strange random choice algorithm

2010-01-30 Thread Hans Aberg
On 30 Jan 2010, at 20:59, michael rice wrote: I'm not sure where I got this PICK function from, and don't understand why it's written as it is, so I wanted to test it for randomness. It seems random enough. But if I understand the algorithm correctly, instead of selecting one of the element

Re: [Haskell-cafe] Strange random choice algorithm

2010-01-30 Thread Daniel Fischer
Am Samstag 30 Januar 2010 20:59:08 schrieb michael rice: > I'm not sure where I got this PICK function from, and don't understand > why it's written as it is, so I wanted to test it for randomness. It > seems random enough. But if I understand the algorithm correctly, > instead of selecting one of

[Haskell-cafe] Strange random choice algorithm

2010-01-30 Thread michael rice
I'm not sure where I got this PICK function from, and don't understand why it's written as it is, so I wanted to test it for randomness. It seems random enough. But if I understand the algorithm correctly, instead of selecting one of the elements from the list, it eliminates all the elements but

[Haskell-cafe] Re: Non-termination of type-checking

2010-01-30 Thread Dan Doel
On Saturday 30 January 2010 3:44:35 am o...@okmij.org wrote: > It seems likely `absurd' diverges in GHCi is because of the GHC > inliner. The paper about secrets of the inliner points out that the > aggressiveness of the inliner can cause divergence in the compiler > when processing code with negat

[Haskell-cafe] ANN: hakyll-1.3

2010-01-30 Thread Jasper Van der Jeugt
Hello, Today I'd like to announce the release of hakyll-1.3. Changes since 1.2: - Categories were added (as opposed to tags). You can find some information in this tutorial[1]. - createListing and createListingWith functions were added, as a way of having a more high-level way to create listings. A

Re: [Haskell-cafe] Why cannot i add the `let` declaration ?

2010-01-30 Thread Ivan Lazar Miljenovic
Andrew Coppin writes: > fac n = product [2..n] Nobody likes a show-off... -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/ha

Re: [Haskell-cafe] Why cannot i add the `let` declaration ?

2010-01-30 Thread Andrew Coppin
Szekeres István wrote: On Sat, Jan 30, 2010 at 8:39 AM, zaxis > wrote: fac n = foldr (*) 1 [1..n] fac n = product [1..n] ;) fac n = product [2..n] :-D ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://ww

Re: [Haskell-cafe] Why cannot i add the `let` declaration ?

2010-01-30 Thread Szekeres István
On Sat, Jan 30, 2010 at 8:39 AM, zaxis wrote: > fac n = foldr (*) 1 [1..n] > fac n = product [1..n] ;) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] C functional programming techniques?

2010-01-30 Thread Sean Leather
2010/1/29 Maurí­cio CA: > Sorry if this looks weird, but do you know of experiences with > functional programming, or "type programming", with C? Using macro > tricks or just good specifications? > This is probably not what you're looking for, but it's related: Single-Assignment C ("Functional Ar

[Haskell-cafe] Re: Non-termination of type-checking

2010-01-30 Thread Ryan Ingram
Thanks for the clear explanation, oleg. -- ryan On Sat, Jan 30, 2010 at 12:44 AM, wrote: > > We explain the technique of systematically deriving absurd terms and > apply it to type families. > > Indeed I should have said that there is no _overt_ impredicative > polymorphism in the example pos

Re: [Haskell-cafe] Re: where is the eros distribution

2010-01-30 Thread Malcolm Wallace
Odd. Looks like most of the packages on d.h.o evaporated. I'll push the repo to a new location. In the move between servers, we took the opportunity to clean up some historical accidents. Many of the repositories formerly on d.h.o could equally live on community.h.o, which offers more pr

Re: [Haskell-cafe] Why cannot i add the `let` declaration ?

2010-01-30 Thread zaxis
thanks! Ivan Lazar Miljenovic wrote: > > zaxis writes: >> find_the_day sDay 0 = sDay >> find_the_day sDay nDay = >> let nextDay = addDays 1 sDay >> if (is_trade_day $ nextDay) >> then find_the_day nextDay (nDay - 1) >> else find_the_day nextDay nDay > > The correct syntax is

[Haskell-cafe] Re: Non-termination of type-checking

2010-01-30 Thread oleg
We explain the technique of systematically deriving absurd terms and apply it to type families. Indeed I should have said that there is no _overt_ impredicative polymorphism in the example posted earlier: it is precisely the impredicative polymorphism that causes the paradox. As everybody notice

Re: [Haskell-cafe] Why cannot i add the `let` declaration ?

2010-01-30 Thread Ivan Lazar Miljenovic
zaxis writes: > find_the_day sDay 0 = sDay > find_the_day sDay nDay = > let nextDay = addDays 1 sDay > if (is_trade_day $ nextDay) > then find_the_day nextDay (nDay - 1) > else find_the_day nextDay nDay The correct syntax is let ... in ...; you've forgotten the "in", so something