Re: [Haskell-cafe] A curios monad

2008-12-13 Thread David Menendez
On Sat, Dec 13, 2008 at 6:00 PM, Andrew Coppin wrote: > David Menendez wrote: >> >> On Thu, Dec 11, 2008 at 1:48 PM, Andrew Coppin >> wrote: >> >>> >>> BTW, does anybody know how rank-N types are different from existential >>> types? >>> >> >> You mean the Haskell extensions? >> >> ExistentialQua

Re: [Haskell-cafe] Data.List.Split

2008-12-13 Thread George Pollard
On Sun, 2008-12-14 at 19:46 +1300, George Pollard wrote: > On Sun, 2008-12-14 at 00:35 -0500, Adam Vogt wrote: > > On another note, is there much use of such simple library functions: does > > concatMap, for instance, save anything other than a couple parantheses, or > > does (concat . map) not n

Re: [Haskell-cafe] Data.List.Split

2008-12-13 Thread George Pollard
On Sun, 2008-12-14 at 00:35 -0500, Adam Vogt wrote: > On another note, is there much use of such simple library functions: does > concatMap, for instance, save anything other than a couple parantheses, or > does (concat . map) not necessarily get optimized into the same thing Bart Massey’s resul

Re: [Haskell-cafe] Data.List.Split

2008-12-13 Thread Adam Vogt
* On Saturday, December 13 2008, Gianfranco Alongi wrote: >I have actually been thinking about a similar thing, but on the "group" >subject. >One can actually group things in many ways, such as groupBy (==) , so >that groupBy (==) [1,2,1,2] should give >[[1,1],[2,2]]. Of course other ideas are po

Re: [Haskell-cafe] A curios monad

2008-12-13 Thread Ryan Ingram
On Sat, Dec 13, 2008 at 3:00 PM, Andrew Coppin wrote: > So how is > foo :: ((forall b. a -> m b) -> m a) -> m a > different from > bar :: forall b. ((a -> m b) -> m a) -> m a Lets use a simpler example: > foo :: (forall a. a -> a) -> (Int, String) > bar :: forall a. (a -> a) -> (Int, String) >

Re: [Haskell-cafe] A curios monad

2008-12-13 Thread Daniel Fischer
Am Sonntag, 14. Dezember 2008 00:00 schrieb Andrew Coppin: > David Menendez wrote: > > On Thu, Dec 11, 2008 at 1:48 PM, Andrew Coppin > > > > wrote: > >> BTW, does anybody know how rank-N types are different from existential > >> types? > > > > You mean the Haskell extensions? > > > > ExistentialQ

Re: [Haskell-cafe] A curios monad

2008-12-13 Thread Andrew Coppin
David Menendez wrote: On Thu, Dec 11, 2008 at 1:48 PM, Andrew Coppin wrote: BTW, does anybody know how rank-N types are different from existential types? You mean the Haskell extensions? ExistentialQuantification lets you define types such as, data SomeNum = forall a. Num a => S

Re: [Haskell-cafe] Small haskell practical course

2008-12-13 Thread Marco Túlio Gontijo e Silva
Em Sáb, 2008-12-13 às 13:07 -0800, Don Stewart escreveu: > marcot: > > Hello, > > > > I've presented a small practical course[0] in EMSL[1]. Any comments are > > welcome. > > > > 0: http://marcot.iaaeee.org/mini-curso.pdf (Portuguese only) > > 1: http://emsl.softwarelivre.org/ > > > > Wonderfu

Re: [Haskell-cafe] Small haskell practical course

2008-12-13 Thread Don Stewart
marcot: > Hello, > > I've presented a small practical course[0] in EMSL[1]. Any comments are > welcome. > > 0: http://marcot.iaaeee.org/mini-curso.pdf (Portuguese only) > 1: http://emsl.softwarelivre.org/ > Wonderful. Maybe you can add it to the .pt section of the Haskell wiki? http://has

[Haskell-cafe] Small haskell practical course

2008-12-13 Thread Marco Túlio Gontijo e Silva
Hello, I've presented a small practical course[0] in EMSL[1]. Any comments are welcome. 0: http://marcot.iaaeee.org/mini-curso.pdf (Portuguese only) 1: http://emsl.softwarelivre.org/ Greetings. -- marcot http://marcot.iaaeee.org/ ___ Haskell-Cafe

Re: [Haskell-cafe] A curios monad

2008-12-13 Thread David Menendez
On Thu, Dec 11, 2008 at 1:48 PM, Andrew Coppin wrote: > > BTW, does anybody know how rank-N types are different from existential > types? You mean the Haskell extensions? ExistentialQuantification lets you define types such as, data SomeNum = forall a. Num a => SomeNum a RankNTypes lets yo

Re: [Haskell-cafe] Parsec and type level numerals

2008-12-13 Thread David Menendez
2008/12/13 Nathan Bloomfield : > I want to be able to parse a string of digits to a type level numeral as > described in the Number parameterized types paper. After fiddling with the > problem for a while, I'm not convinced it's possible- it seems as though one > would need to know the type of the

Re: [Haskell-cafe] Parsec and type level numerals

2008-12-13 Thread Ryan Ingram
You're almost there, but you have correctly determined the problem; you need to know the type of the parse result in order to parse. However, it is possible to hide the type from the parser; try writing this function instead: {-# LANGUAGE ExistentialQuantification #-} data AnyCard = forall t. Car

Re: [Haskell-cafe] A curios monad

2008-12-13 Thread Ryan Ingram
2008/12/11 Luke Palmer : > If you could guarantee that the ID of a key is globally unique, even through > different invocations of the monad (using eg. unsafePerformIO newUnique), > then you could ensure type safety and allow transport of keys between > different monads. Well, for type-safety you

Re: [Haskell-cafe] Parsec and type level numerals

2008-12-13 Thread brian
2008/12/13 Nathan Bloomfield : > I want to be able to parse a string of digits to a type level numeral as > described in the Number parameterized types paper. Hi, I'm at UA too (bsl04). Here's a quick try. Sorry if I'm not getting what you're doing. import Text.Parsec import Text.Parsec.String d

[Haskell-cafe] Parsec and type level numerals

2008-12-13 Thread Nathan Bloomfield
Hello all. I've got a puzzling Parsec problem. Perhaps the collective wisdom of haskell-cafe can point me in the right direction. I want to be able to parse a string of digits to a type level numeral as described in the Number parameterized types

[Haskell-cafe] Haskell Weekly News: Issue 97 - December 13, 2008

2008-12-13 Thread Brent Yorgey
--- Haskell Weekly News http://sequence.complete.org/hwn/20081213 Issue 97 - December 13, 2008 --- Welcome to issue 97 of HWN, a newsletter covering

Re: [Haskell-cafe] Data.List.Split

2008-12-13 Thread Gianfranco Alongi
I have actually been thinking about a similar thing, but on the "group" subject. One can actually group things in many ways, such as groupBy (==) , so that groupBy (==) [1,2,1,2] should give [[1,1],[2,2]]. Of course other ideas are possible. On Sat, Dec 13, 2008 at 5:47 PM, Brent Yorgey wrote: >

Re: [Haskell-cafe] Data.List.Split

2008-12-13 Thread Brent Yorgey
On Sat, Dec 13, 2008 at 05:39:55PM +0100, Gianfranco Alongi wrote: > A very nice initiative I must say; although the page should contain > the usual explanation for why such a split method can't be universal. > That is, add the same explanation you give every time; but to the > page. Good idea; I'

Re: [Haskell-cafe] Data.List.Split

2008-12-13 Thread Gianfranco Alongi
A very nice initiative I must say; although the page should contain the usual explanation for why such a split method can't be universal. That is, add the same explanation you give every time; but to the page. /Gianfranco On Sat, Dec 13, 2008 at 5:30 PM, Brent Yorgey wrote: > Today yet another n

[Haskell-cafe] Data.List.Split

2008-12-13 Thread Brent Yorgey
Today yet another newbie in #haskell asked about a 'split' function for lists, and I got fed up with saying 'no one can agree on the right interface so it doesn't exist, just write it yourself', because it's a really dumb answer, even if it's true. Instead of trying to get a 'split' function added

Re: [Haskell-cafe] Missing comment highlighting in vim syntax script

2008-12-13 Thread brian
On Sat, Dec 13, 2008 at 9:10 AM, Ori Avtalion wrote: > Comments on the same line as import declarations don't get highlighted: > import A -- This comment isn't highlighted > import B {- Neither is this -} > import C {- and >this -} I think the way vim tries to do syntax highlighting i

[Haskell-cafe] Missing comment highlighting in vim syntax script

2008-12-13 Thread Ori Avtalion
Hi all, The Haskell syntax script for vim mentions this mailing list as the maintainer. Perhaps one of you could fix this bug. Comments on the same line as import declarations don't get highlighted: import A -- This comment isn't highlighted import B {- Neither is this -} import C {- and