Re: [Haskell-cafe] Announce type-level-natural-number-1.0: Simple, Haskell 2010-compatible type level natural numbers

2010-07-31 Thread Henning Thielemann
On Fri, 30 Jul 2010, John Meacham wrote: Heh. I was just thinking I needed type level naturals last night at the pub. 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

Re: [Haskell-cafe] Announce type-level-natural-number-1.0: Simple, Haskell 2010-compatible type level natural numbers

2010-07-31 Thread Alexey Khudyakov
On Fri, 30 Jul 2010 15:20:55 -0700 John Meacham j...@repetae.net wrote: type family Add n m :: * type instance Add Zero Zero = Zero type instance Add Zero (SuccessorTo n) = SuccessorTo n type instance Add (SuccessorTo n) m= SuccessorTo (Add n m) Standard package

[Haskell-cafe] Announce type-level-natural-number-1.0: Simple, Haskell 2010-compatible type level natural numbers

2010-07-30 Thread Gregory Crosswhite
Hey everyone, I am pleased to announce the release of the type-level-natural-number package, which implements natural numbers at the type level. Although there are many packages on Hackage that implement type level natural numbers, this package is distinguished by its simplicity: it does not

Re: [Haskell-cafe] Announce type-level-natural-number-1.0: Simple, Haskell 2010-compatible type level natural numbers

2010-07-30 Thread Alexey Khudyakov
On Fri, 30 Jul 2010 13:28:19 -0700 Gregory Crosswhite gcr...@phys.washington.edu wrote: Hey everyone, I am pleased to announce the release of the type-level-natural-number package, which implements natural numbers at the type level. Although there are many packages on Hackage that

Re: [Haskell-cafe] Announce type-level-natural-number-1.0: Simple, Haskell 2010-compatible type level natural numbers

2010-07-30 Thread John Meacham
On Sat, Jul 31, 2010 at 01:32:50AM +0400, Alexey Khudyakov wrote: The envisioned use case is for annotating types with natural numbers, so that extra functionality such as addition and subtraction of natural numbers is unnecessary. Nothing is stopping someone from implementing this

Re: [Haskell-cafe] Announce type-level-natural-number-1.0: Simple, Haskell 2010-compatible type level natural numbers

2010-07-30 Thread John Meacham
Heh. I was just thinking I needed type level naturals last night at the pub. I wanted to support gcc's vector type extension in jhc http://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html which allow diretly expressing vector operations that use the SIMD features of modern CPUS, I didn't want