Re: [Haskell] Power series in a nutshell

2007-07-17 Thread Wolfgang Jeltsch
Am Dienstag, 17. Juli 2007 11:47 schrieb Bas van Dijk: > […] > GHC HEAD has support for overloaded String literals. See: > > http://haskell.org/ghc/dist/current/docs/users_guide/other-type-extensions. > html#overloaded-strings These are really good news! However, the identifier IsString is probl

Re: [Haskell] Power series in a nutshell

2007-07-17 Thread Bas van Dijk
On 7/17/07, Ryan Ingram <[EMAIL PROTECTED]> wrote: Automatic conversion to numeric types via fromInteger could be extended to other types; fromList and fromString could be applied automatically to convert other literals: class LiteralString a where fromString :: String -> a class LiteralList a b

Re: [Haskell] Power series in a nutshell

2007-07-16 Thread Ryan Ingram
This is really interesting. I love how the typechecker can resolve 1:0:1 (representing (1+x^2)) 1 : 0 : 1 => 1 : 0 : (fromInteger 1 :: [Integer]) => 1 : 0 : (series (fromInteger 1 :: Integer)) => 1 : 0 : (series 1) => 1 : 0 : 1 : repeat 0 (I'm going to go on a bit of a soapbox here...) I feel

Re: [Haskell] Power series in a nutshell

2007-07-12 Thread jerzy . karczmarczuk
Derek Elkins writes: Doug McIlroy wrote: For lovers of things small and beautiful, http://www.cs.dartmouth.edu/~doug/powser.html ... and a link to your earlier Functional Pearl, http://citeseer.ist.psu.edu/mcilroy98power.html If somebody is interested in similar manipulations, sometimes a b

Re: [Haskell] Power series in a nutshell

2007-07-12 Thread Derek Elkins
On Thu, 2007-07-12 at 12:49 -0400, Doug McIlroy wrote: > For lovers of things small and beautiful, > http://www.cs.dartmouth.edu/~doug/powser.html > boils down basic operations on power series with numeric > coefficients to the bare minimum--each is a one-liner. > Included are overloaded arithmeti

Re: [Haskell] Power series in a nutshell

2007-07-12 Thread Taral
On 7/12/07, Doug McIlroy <[EMAIL PROTECTED]> wrote: http://www.cs.dartmouth.edu/~doug/powser.html Very nice. I would only recommend that you include: scale k f = map (k*) f and have (*) use it. Thanks for your contribution! -- Taral <[EMAIL PROTECTED]> "Please let me know if there's any furt

[Haskell] Power series in a nutshell

2007-07-12 Thread Doug McIlroy
For lovers of things small and beautiful, http://www.cs.dartmouth.edu/~doug/powser.html boils down basic operations on power series with numeric coefficients to the bare minimum--each is a one-liner. Included are overloaded arithmetic operators, integration, differentiation, functional composition,