[Haskell-cafe] Announce type-level-natural-number-1.0: Simple,
Haskell 2010-compatible type level natural numbers
lemming at henning-thielemann.de
Sat Jul 31 02:56:31 EDT 2010
On Fri, 30 Jul 2010, John Meacham wrote:
> Heh. I was just thinking I needed type level naturals last night at the
I thought about type level naturals yesterday when working with HList and
found that HList's dependency on TemplateHaskell is quite heavy.
> I wanted to support gcc's vector type extension in jhc
> which allow diretly expressing vector operations that use the SIMD
> features of modern CPUS, I didn't want to pre-create every possible
> choice so encoding the size as a type level number makes sense.
The llvm wrapper supports CPU vector data types by decimal type level
numbers from the type-level package as phantom type parameters, which I
found nice to use. However the whole type level arithmetic is quite slow.
Btw. I got to know that there is a difference between Vector computing and
SIMD computing, most notably that Vector units (like Altivec and SSE)
support vector element shuffling and SIMD machines (like GPUs) do not.
More information about the Haskell-Cafe