Re: [Haskell-cafe] number-parameterized types and heterogeneous lists

2008-06-22 Thread Harald ROTTER
Hello, sorry for the late answer, I was off for the weekend :-) The paper "Number-parameterized types" by Oleg Kielyov is located at http://okmij.org/ftp/papers/number-parameterized-types.pdf It impressively shows what one can do with Haskell's type system. What I am after is the replacem

Re: [Haskell-cafe] Help with generalizing function

2008-06-22 Thread Bulat Ziganshin
Hello leledumbo, Monday, June 23, 2008, 10:30:51 AM, you wrote: > I've successfully create a function to return lists of N-ple that satisfy the tuples may contain any combination of types, use lists instead -- Best regards, Bulatmailto:[EMAIL PROTECTED] __

Re: [Haskell-cafe] Help with generalizing function

2008-06-22 Thread Ryan Ingram
Hint: use recursion. Hint 2: You can use <- in a list comprehension or list "do"-block to select a single list from a list of lists. -- ryan On Sun, Jun 22, 2008 at 11:30 PM, leledumbo <[EMAIL PROTECTED]> wrote: > > I've successfully create a function to return lists of N-ple that satisfy the

Re: [Haskell-cafe] What is a rigid type variable?

2008-06-22 Thread Ryan Ingram
To answer the question in the subject: >From "Simple unification-based type inference for GADTs", Peyton-Jones, et al. ICFP 2006. http://research.microsoft.com/users/simonpj/papers/gadt/ "Instead of "user-specified type", we use the briefer term rigid type to describe a type that is completely s

[Haskell-cafe] Help with generalizing function

2008-06-22 Thread leledumbo
I've successfully create a function to return lists of N-ple that satisfy the following function: x1 + x2 + x3 + ... + xN = C But unfortunately, it's not generic. The N is supposed to be an input, too. I don't know how to make a dynamic N-ple (is it possible anyway?). Currently, here's the impleme

Re: [Haskell-cafe] What is a rigid type variable?

2008-06-22 Thread Luke Palmer
On Mon, Jun 23, 2008 at 5:58 AM, Luke Palmer <[EMAIL PROTECTED]> wrote: > On Mon, Jun 23, 2008 at 3:26 AM, Xiao-Yong Jin <[EMAIL PROTECTED]> wrote: >> Hi all, >> >> I'm writing a short function as follows, but I'm not able to >> find a suitable type signature for `go'. It uses >> Numeric.LinearAlg

Re: [Haskell-cafe] What is a rigid type variable?

2008-06-22 Thread Luke Palmer
On Mon, Jun 23, 2008 at 3:26 AM, Xiao-Yong Jin <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm writing a short function as follows, but I'm not able to > find a suitable type signature for `go'. It uses > Numeric.LinearAlgebra from hmatrix. > > > -- | Map each element in a vector to vectors and thus

[Haskell-cafe] Planet haskell

2008-06-22 Thread Jamie Brandon
I was hoping to have my summer of code blog added to planet haskell but [EMAIL PROTECTED] no longer seems to exist. Hopefully the owner is subscribed to this list? Jamie ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailma

[Haskell-cafe] What is a rigid type variable?

2008-06-22 Thread Xiao-Yong Jin
Hi all, I'm writing a short function as follows, but I'm not able to find a suitable type signature for `go'. It uses Numeric.LinearAlgebra from hmatrix. -- | Map each element in a vector to vectors and thus form a matrix -- | row by row mapVecToMat :: (Element a, Element b) => (

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-22 Thread Richard A. O'Keefe
This is increasingly less relevant to Haskell, except of course to demonstrate what a nice language Haskell is. On 20 Jun 2008, at 11:34 pm, Jules Bean wrote: I think where I differ on you is how to map the semantics of a C- like language to explicit references. I would argue that the glyph "c"

Re: [Haskell-cafe] INVITATION

2008-06-22 Thread Don Stewart
james: > Haskell Hall wrote: > > Haskell Hall is up and running. Haskell Hall is a mailing list, a > forum, where you can discuss Haskell, functional programming and > anything related, freely and openly with fellow enthusiasts. We welcome > people of all abilities and know-how. So, if you fancy

Re: [Haskell-cafe] INVITATION

2008-06-22 Thread James Britt
Haskell Hall wrote: > Haskell Hall is up and running. Haskell Hall is a mailing list, a forum, where you can discuss Haskell, functional programming and anything related, freely and openly with fellow enthusiasts. We welcome people of all abilities and know-how. So, if you fancy a change from

Re: [Haskell-cafe] Safe way to parse arguments?

2008-06-22 Thread Henning Thielemann
On Sat, 21 Jun 2008, Xiao-Yong Jin wrote: Hi, I'm wondering how usually you parse command line arguments list safely. If the given argument is wrong, the program can still print out some error information instead of giving something like Prelude.read: no parse It's generally not a good ide

Re: [Haskell-cafe] another FFI question

2008-06-22 Thread Niels Aan de Brugh
On Sat, 2008-06-21 at 00:20 +0400, Bulat Ziganshin wrote: > > probably, you don't understand differences between OOP classes and > type classes. look at http://haskell.org/haskellwiki/OOP_vs_type_classes > and papers mentioned there I took the liberty to update some of the C++ code on that page s

Re: [Haskell-cafe] ieee 754

2008-06-22 Thread Henning Thielemann
On Sun, 22 Jun 2008, Lennart Augustsson wrote: Haskell does not allow you to change rounding mode, NaN signallng mode, etc. But otherwise Haskell on modern platforms conforms to IEEE 754. It just uses the machine floating point implementation, which is most oftenly IEEE. However the good new

[Haskell-cafe] INVITATION

2008-06-22 Thread Haskell Hall
Haskell Hall is up and running. Haskell Hall is a mailing list, a forum, where you can discuss Haskell, functional programming and anything related, freely and openly with fellow enthusiasts. We welcome people of all abilities and know-how. So, if you fancy a change from what you get on Haskell

[Haskell-cafe] Testing

2008-06-22 Thread Haskell Hall
Testing Testing _ Need to know now? Get instant answers with Windows Live Messenger. http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL_Refresh_messenger_062008___

[Haskell-cafe] Scripting OpenOffice with Haskell

2008-06-22 Thread Henning Thielemann
Has someone already tried to communicate with OpenOffice via Haskell? An interface seems to exist: http://framework.openoffice.org/scripting/index.html For instance, I like to mark some cells in oocalc, preprocess them and write them to a database. _

Re: [Haskell-cafe] ieee 754

2008-06-22 Thread Lennart Augustsson
Haskell does not allow you to change rounding mode, NaN signallng mode, etc. But otherwise Haskell on modern platforms conforms to IEEE 754. -- Lennart On Sun, Jun 22, 2008 at 9:37 AM, Sean McLaughlin <[EMAIL PROTECTED]> wrote: > Hello, > > I'm considering using Haskell for a numerical applica

[Haskell-cafe] ieee 754

2008-06-22 Thread Sean McLaughlin
Hello, I'm considering using Haskell for a numerical application. However, I need to rely on IEEE 754 standards being implemented correctly. What is the current state of 754 in Haskell? The definition has this paragraph, which makes me suspect Haskell is not appropriate for this application: