Re: [Haskell-cafe] More STUArray questions

2006-03-15 Thread Martin Percossi
On Mon, Mar 13, 2006 at 10:47:58PM +0100, Roberto Zunino wrote: > Martin Percossi wrote: > >matrix.hs:138:27: > > > > Couldn't match the rigid variable `.' against `ST' > > `.' is bound by the type signature for `runSTMatrix' > > Expected type: ST s > > Inferred type: . (forall s1) >

Re: [Haskell-cafe] More STUArray questions

2006-03-13 Thread Roberto Zunino
Martin Percossi wrote: matrix.hs:138:27: Couldn't match the rigid variable `.' against `ST' `.' is bound by the type signature for `runSTMatrix' Expected type: ST s Inferred type: . (forall s1) Something seems wrong here. Above '.' was parsed as an infix type variable. As

Re: [Haskell-cafe] More STUArray questions

2006-03-12 Thread Martin Percossi
On Sun, Mar 12, 2006 at 08:51:57PM +, Chris Kuklewicz wrote: > There is a small error in the type of runSTMatrix, see below > runSTMatrix :: (forall s. ST s (MMatrix s)) -> Matrix > > runSTMatrix a = runST ( do (MMatrix i j mblock) <- a >block <- unsafeFreeze mblock

Re: [Haskell-cafe] More STUArray questions

2006-03-12 Thread Chris Kuklewicz
Martin Percossi wrote: > On Sun, Mar 12, 2006 at 10:37:45PM +0300, Bulat Ziganshin wrote: >> runSTMatrix :: ST s (MMatrix s) -> Matrix >> >> runSTMatrix a = runST ( do (MMatrix i j mblock) <- a >>block <- unsafeFreeze mblock >>return (Matrix i

Re: [Haskell-cafe] More STUArray questions

2006-03-12 Thread Martin Percossi
On Sun, Mar 12, 2006 at 10:37:45PM +0300, Bulat Ziganshin wrote: > Sunday, March 12, 2006, 8:49:15 PM, you wrote: > MP> 1. Haskell-nativeness: I have had some issues compiling and linking with > gsl > MP> libraries on 64-bit platforms. Also, it would be quite interesting to > gauge > MP> haskell'

Re: [Haskell-cafe] More STUArray questions

2006-03-12 Thread Bulat Ziganshin
Hello Martin, Sunday, March 12, 2006, 8:49:15 PM, you wrote: MP> 1. Haskell-nativeness: I have had some issues compiling and linking with gsl MP> libraries on 64-bit platforms. Also, it would be quite interesting to gauge MP> haskell's effectiveness as a scientific computing platform, in particula

Re: [Haskell-cafe] More STUArray questions

2006-03-12 Thread Martin Percossi
On Sun, Mar 12, 2006 at 09:15:57PM +0200, Einar Karttunen wrote: > On 12.03 18:44, Martin Percossi wrote: > > However, just out of curiosity, I'm still curious at how I could do the > > runSTMatrix, which would really be the icing on the cake in terms of client > > usability. > > You might want to

Re: [Haskell-cafe] More STUArray questions

2006-03-12 Thread Einar Karttunen
On 12.03 18:44, Martin Percossi wrote: > However, just out of curiosity, I'm still curious at how I could do the > runSTMatrix, which would really be the icing on the cake in terms of client > usability. You might want to look at the definition of Data.Array.ST (at http://darcs.haskell.org/package

Re: [Haskell-cafe] More STUArray questions

2006-03-12 Thread Martin Percossi
Thanks for the tip. A modified version of your suggestion worked for me: unsafeFreezeMatrix :: MMatrix s -> ST s Matrix unsafeFreezeMatrix (MMatrix x1 x2 marray) = do block <- unsafeFreeze marray return $ Matrix x1 x2 block However, just out of curi

Re: [Haskell-cafe] More STUArray questions

2006-03-12 Thread Chris Kuklewicz
Martin Percossi wrote: > Hello, I am trying to write a haskell-native matrix library (providing a > similar set of functionality as gsl's matrix/eigenvector routines). I have had > a look at other attempts at matrix libraries, and have found Hal Daume's and > Alberto Ruiz's libraries to offer a goo

[Haskell-cafe] More STUArray questions

2006-03-12 Thread Martin Percossi
Hello, I am trying to write a haskell-native matrix library (providing a similar set of functionality as gsl's matrix/eigenvector routines). I have had a look at other attempts at matrix libraries, and have found Hal Daume's and Alberto Ruiz's libraries to offer a good amount of functionality. Ther