Re: [Haskell] making inits less strict

2008-04-23 Thread Ian Lynagh
On Mon, Apr 07, 2008 at 03:11:16PM -0400, John Tromp wrote: > An improved version is: > > inits l = [] : case l of [] -> [] >(x:xs) -> map (x:) inits xs For information on how to propose this, please see http://www.haskell.org/haskellwiki/Library_submissions Th

[Haskell] Matrix multiplication

2008-04-23 Thread Rishiyur Nikhil
You may be interested in also looking at the winning entry in the design competition of the "5th ACM-IEEE Intl. Conf. on Formal Methods and Models for Codesign (MEMOCODE'2007)" http://www.ece.cmu.edu/~jhoe/distribution/mc07contest/ The design problem was a fast matrix multiplier using a combi

Re: [Haskell] How to define tail function for Even/Odd GADT lists?

2008-04-23 Thread Martijn Schrage
Hi Ki Yung, It depends a bit on what you want to use these lists for, but the following encoding works for your examples and doesn't need the type class. data E data O type Even = (E,O) type Odd  = (O,E) data List p a where   Nil  :: List a Even   Cons :: a -> List a (p1,p2) -> List a (

[Haskell] How to define tail function for Even/Odd GADT lists?

2008-04-23 Thread Ahn, Ki Yung
Using GADTs and functional dependencies, we can define GADT lists that statically distinguishes even length lists from odd length lists. > data Even > data Odd > > class Flip b c | b -> c, c -> b where > > instance Flip Even Odd where > instance Flip Odd Even where > > data List a b where > Nil

Haskell performance Re: [Haskell] Matrix multiplication

2008-04-23 Thread Bulat Ziganshin
Hello Tillmann, Wednesday, April 23, 2008, 8:01:50 PM, you wrote: > I am currently experimenting with parallelizing C-programs. I have > therefore written a matrix vector multiplication example that needs 13 > seconds to run (5 seconds with OpenMP). Because I like Haskell I did the > same in this

[Haskell] Matrix multiplication

2008-04-23 Thread Tillmann Vogt
ups, wrong newsgroup, sorry ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell] DEADLINE EXTENSION: (WFLP'08) 17th Int'l Workshop on Functional and (Constraint) Logic Programming

2008-04-23 Thread demis
=== (DEADLINE EXTENSION) WFLP 2008 17th International Workshop on Functional and (Constraint) Logic Programming Siena, Italy, July

[Haskell] Matrix multiplication

2008-04-23 Thread Tillmann Vogt
Hi, I am currently experimenting with parallelizing C-programs. I have therefore written a matrix vector multiplication example that needs 13 seconds to run (5 seconds with OpenMP). Because I like Haskell I did the same in this language, but it takes about 134 seconds. Why is it so slow? Does

[Haskell] ANN: TagSoup library 0.6

2008-04-23 Thread Neil Mitchell
Hi I am pleased to announce the TagSoup 0.6 library, available from Hackage: * http://hackage.haskell.org/cgi-bin/hackage-scripts/package/tagsoup "TagSoup is a library for extracting information out of unstructured HTML code, sometimes known as tag-soup. The HTML does not have to be well formed,