[Haskell-cafe] Just curios

2007-06-10 Thread Andrew Coppin
OK, so this doesn't actually have anything to do with programming in Haskell, but... How in the name of God does a human being end up walking around with a name like Haskell B. Curry? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] LaTeX

2007-06-10 Thread Andrew Coppin
Brian Sniffen wrote: lhs2TeX uses \newcommand{\plus}{\mathbin{+\!\!\!+}} Ah, OK. That looks good... Thanks. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Data polymophism

2007-06-10 Thread Phlex
Just to keep you updated, Ok so the design was bad ... a table of elements 'a' will have indexes that hold elements of the same type 'a' so the list of indexes can be [dbIndex a].. There's was still one polymorphism issue : data DbIndex a = DbIndex {dbiInsert :: Row a - Maybe

Re: [Haskell-cafe] Just curios

2007-06-10 Thread Brandon S. Allbery KF8NH
On Jun 10, 2007, at 6:16 , Andrew Coppin wrote: OK, so this doesn't actually have anything to do with programming in Haskell, but... How in the name of God does a human being end up walking around with a name like Haskell B. Curry? You're pretty close, actually :) Names derived from

[Haskell-cafe] How to dynamically attach readers to streams?

2007-06-10 Thread Marc Weber
Example: main = readFile /dev/input/mouse = mapM print . streamToEvents That's no easy. Now I want to listen to those events remotely using a network conncetion Data.Network does provide everything I need. Is this done by substituting the print function with something like sent event = do

[Haskell-cafe] Re: HList questions

2007-06-10 Thread oleg
Marc Weber wrote: Do you know what a type indexed coproduct is ? (TIC.hs from HList) What is the purpose of this module? In a regular Haskell record, we can retrieve the value of one of its components given the label. A type-indexed Product (TIP, or TIR) is a similar collection of values --

[Haskell-cafe] Switch optimization

2007-06-10 Thread Thomas Conway
Hi All, I'm writing some variable byte codec routines, which are used in inner^N loops, and which I want to make really efficient. There are several spots where the code uses lookup tables. The best example is the table, which given the first byte, returns the number of additional bytes. It is

Re: [Haskell-cafe] Switch optimization

2007-06-10 Thread Stefan O'Rear
On Mon, Jun 11, 2007 at 09:43:17AM +1000, Thomas Conway wrote: Hi All, I'm writing some variable byte codec routines, which are used in inner^N loops, and which I want to make really efficient. There are several spots where the code uses lookup tables. The best example is the table, which

[Haskell-cafe] Re: HList questions

2007-06-10 Thread Marc Weber
Hi Oleg! On Sun, Jun 10, 2007 at 04:26:43PM -0700, [EMAIL PROTECTED] wrote: [...] A type-indexed Product (TIP, or TIR) is a similar collection of values -- indexed [..] by their type. So its stylistic too. Because you can also just use hOccurs? and product vs record emphasizes that there is

[Haskell-cafe] Switch optimization

2007-06-10 Thread Tom Pledger
Stefan O'Rear wrote: | On Mon, Jun 11, 2007 at 09:43:17AM +1000, Thomas Conway wrote: : | codeLen 127 = 0 | codeLen 128 = 1 | ... | codeLen 255 = 8 | | Now, compiling with ghc 6.6.1 and -O3, I see that it generates a long | chain of conditional branches. : That's deeply tied in