Re: [Haskell-cafe] generate a news summary page from web services

2007-09-07 Thread brad clawsie
On Fri, Sep 07, 2007 at 08:43:34PM -0700, Justin Bailey wrote: > Could you put an example of the generated HTML up too? sure! http://www.b7j0c.org/content/newspage-sample.html which is now linked in from the original article http://www.b7j0c.org/content/haskell-newspage.html __

Re: [Haskell-cafe] generate a news summary page from web services

2007-09-07 Thread Justin Bailey
On 9/7/07, brad clawsie <[EMAIL PROTECTED]> wrote: > i recently worked up a little example program i use to generate a > general news summary page using yahoo web services Thanks for posting that. Could you put an example of the generated HTML up too? Justin __

[Haskell-cafe] generate a news summary page from web services

2007-09-07 Thread brad clawsie
i recently worked up a little example program i use to generate a general news summary page using yahoo web services if you are interested in an example of XHT and Text.XHtml.Strict in action, you can see it here http://www.b7j0c.org/content/haskell-newspage.html

Re: [Haskell-cafe] Help understanding type error

2007-09-07 Thread Derek Elkins
On Sat, 2007-09-08 at 12:24 +1000, Stuart Cook wrote: > On 9/8/07, Ryan Ingram <[EMAIL PROTECTED]> wrote: > > This does what you want, I think: > > > > {-# LANGUAGE ExistentialQuantification #-} > > module Exist where > > > > data Showable = forall a. (Show a) => Showable a > > instance Show Showab

Re: [Haskell-cafe] Help understanding type error

2007-09-07 Thread Stuart Cook
On 9/8/07, Ryan Ingram <[EMAIL PROTECTED]> wrote: > This does what you want, I think: > > {-# LANGUAGE ExistentialQuantification #-} > module Exist where > > data Showable = forall a. (Show a) => Showable a > instance Show Showable where >showsPrec p (Showable a) = showsPrec p a >show (Show

[Haskell-cafe] Re: Block-wise lazy sequences in Haskell

2007-09-07 Thread Benjamin Franksen
Bryan O'Sullivan wrote: > Henning Thielemann wrote: > >> I thought it must be possible to define an unboxed array type with >> Storable elements. > > Yes, this just hasn't been done. There would be a few potentially > tricky corners, of course; Storable instances are not required to be > fi

[Haskell-cafe] Re: Extending the idea of a general Num to other types?

2007-09-07 Thread ChrisK
Dan Piponi wrote: > On 9/5/07, Ketil Malde <[EMAIL PROTECTED]> wrote: >> On Wed, 2007-09-05 at 08:19 +0100, Simon Peyton-Jones wrote: >> Error message from GHCi: >> test/error.hs:2:8: >> No instance for (Num String) >> arising from use of `+' at test/error.hs:2:8-17 >>

[Haskell-cafe] Re: Extending the idea of a general Num to other types?

2007-09-07 Thread Benjamin Franksen
Dan Piponi wrote: > On 9/5/07, Ketil Malde <[EMAIL PROTECTED]> wrote: >> On Wed, 2007-09-05 at 08:19 +0100, Simon Peyton-Jones wrote: >> Error message from GHCi: >> test/error.hs:2:8: >> No instance for (Num String) >> arising from use of `+' at test/error.hs:2:8-17 >>

Re: [Haskell-cafe] Learning advice

2007-09-07 Thread Brandon S. Allbery KF8NH
On Sep 7, 2007, at 14:37 , Albert Y. C. Lai wrote: Brent Yorgey wrote: Then one day he met someone else who said she was also a race car driver, but her car was different -- she called it a "Haskar". It had a top speed of 400 miles per hour, no steering wheel (you just lean whichever way

Re: [Haskell-cafe] Help understanding type error

2007-09-07 Thread Ryan Ingram
This does what you want, I think: {-# LANGUAGE ExistentialQuantification #-} module Exist where data Showable = forall a. (Show a) => Showable a instance Show Showable where showsPrec p (Showable a) = showsPrec p a show (Showable a) = show a -- You have to use the default implementation

Re: [Haskell-cafe] Learning advice

2007-09-07 Thread Albert Y. C. Lai
Brent Yorgey wrote: Then one day he met someone else who said she was also a race car driver, but her car was different -- she called it a "Haskar". It had a top speed of 400 miles per hour, no steering wheel (you just lean whichever way you want to go, she said), I wish I could just lean le

Fwd: [Haskell-cafe] turning an imperative loop to Haskell

2007-09-07 Thread Stephen Dolan
Sorry, forgot to cc list > I think this is called taking a good thing too far, but cool too: > > > f1 u = u + 1 > f2 u v = u + v > f3 u v w = u + v + w > > -- functions renamed for consistency) > zipWith1 = map > zipWith2 = zipWith > > -- and hey presto! > us1 = 3 : zipWith1 f1 us1 > us2 = 2 : 3 :

Re: [Haskell-cafe] Speed of character reading in Haskell

2007-09-07 Thread Chaddaï Fouché
>From what I can see of your program, it would greatly benefit from using Data.ByteString, is there an obvious reason not to use it ? (Some list operations are too expensive with ByteString but for most string processing it's perfectly fine and much faster than String). -- Jedaï _

Re: [Haskell-cafe] Learning advice

2007-09-07 Thread Wouter Swierstra
Hi Chris, I should also point out that the wiki has a lot of really useful links: http://www.haskell.org/haskellwiki/Learning_Haskell Good luck, Wouter This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your com

[Haskell-cafe] Hackage and GHC 6.8

2007-09-07 Thread Neil Davies
Given that GHC 6.8 is just around the corner and, given how it has re-organised the libraries so that the dependencies in many (most/all) the packages in the hackage DB are now not correct. Is there a plan of how to get hackage DB up to speed with GHC 6.8 ? Cheers Neil __

[Haskell-cafe] Re: Help understanding type error

2007-09-07 Thread Dominic Steinitz
Matthew Brecknell brecknell.org> writes: > > Levi Stephen: > > I have a data type: > > > > > data T a = forall b. (Show b) => T b a > > > > and I want to use/extract 'b' from this. > > You can't. (Well, I believe you can if you have prior knowledge of the > actual type of the existentially wr

Re: [Haskell-cafe] Re: Typeclasses and implicit parameters

2007-09-07 Thread ajb
G'day all. Quoting Chung-chieh Shan <[EMAIL PROTECTED]>: Yes. You can even do this portably, using nothing "unsafe", with Dylan Thurston's technique: That paper gives you a choice between inefficient and leaky. I think I'll take unsafeCoerce#. :-) Cheers, Andrew Bromage ___