Re: [Haskell-cafe] Questions about the Functor cl ass and it's use in Data types à la carte

2007-12-16 Thread Jonathan Cast
On 16 Dec 2007, at 2:23 AM, Dominic Steinitz wrote: keep in mind that Haskell composition (.) is not really composition in the category-theoretic sense, because it adds extra laziness. Use this Do you have a counter-example of (.) not being function composition in the categorical sense? Let

Re: [Haskell-cafe] Questions about the Functor cl ass and it's use in Data types à la carte

2007-12-16 Thread Jonathan Cast
On 16 Dec 2007, at 3:21 AM, Dominic Steinitz wrote: Do you have a counter-example of (.) not being function composition in the categorical sense? Let bot be the function defined by bot :: alpha - beta bot = bot By definition, (.) = \ f - \ g - \ x - f (g x) Then bot . id = ((\ f - \

Re: [Haskell-cafe] Questions about the Functor cl ass and it's use in Data types à la carte

2007-12-16 Thread Sterling Clover
Am I correct in assuming that if my program doesn't contain seq then I can reason using eta reduction? You may be well aware of this, but the wiki page on the correctness of short cut fusion (http://haskell.org/haskellwiki/ Correctness_of_short_cut_fusion) really helped me to get at least a

Re: [Haskell-cafe] Questions about the Functor cl ass and it's use in Data types à la carte

2007-12-16 Thread Jonathan Cast
On 16 Dec 2007, at 9:47 AM, Dominic Steinitz wrote: Jonathan Cast wrote: On 16 Dec 2007, at 3:21 AM, Dominic Steinitz wrote: Do you have a counter-example of (.) not being function composition in the categorical sense? Let bot be the function defined by bot :: alpha - beta bot = bot By