Comments on: Generalizing (.) http://comonad.com/reader/2006/generalizing-dot/ types, (co)monads, substructural logic Sat, 29 Dec 2012 15:18:06 -0800 http://wordpress.org/?v=2.8.4 hourly 1 By: Edward Kmett http://comonad.com/reader/2006/generalizing-dot/comment-page-1/#comment-42597 Edward Kmett Fri, 11 Mar 2011 20:02:18 +0000 http://comonad.com/reader/2006/generalizing-haskell-function-composition/#comment-42597 Paul: Back when I wrote this post I gave the updated (.) the wrong precedence, it should be infixr 9 . Paul:

Back when I wrote this post I gave the updated (.) the wrong precedence, it should be

infixr 9 .

]]>
By: Paul Keir http://comonad.com/reader/2006/generalizing-dot/comment-page-1/#comment-42556 Paul Keir Fri, 11 Mar 2011 12:44:52 +0000 http://comonad.com/reader/2006/generalizing-haskell-function-composition/#comment-42556 Another great post and really neat idea. I tried ((+2) . (*3)) 5 and also ((+2) . (*3)) $ 5 but this (+2) . (*3) $ 5 complains about a missing Num instance for the literal '5'. It makes me wonder why the 5 is accepted in any case, as it's not (here at least) an instance of Functor? Another great post and really neat idea. I tried
((+2) . (*3)) 5
and also
((+2) . (*3)) $ 5
but this
(+2) . (*3) $ 5
complains about a missing Num instance for the literal ‘5′. It makes me wonder why the 5 is accepted in any case, as it’s not (here at least) an instance of Functor?

]]>
By: Edward Kmett http://comonad.com/reader/2006/generalizing-dot/comment-page-1/#comment-251 Edward Kmett Tue, 24 Jul 2007 15:05:25 +0000 http://comonad.com/reader/2006/generalizing-haskell-function-composition/#comment-251 Thanks. Fixed. I honestly, just typed that off the cuff. Thats what I get for not actually compiling it before posting ;) Thanks. Fixed.

I honestly, just typed that off the cuff.

Thats what I get for not actually compiling it before posting ;)

]]>
By: Fritz http://comonad.com/reader/2006/generalizing-dot/comment-page-1/#comment-250 Fritz Tue, 24 Jul 2007 07:58:47 +0000 http://comonad.com/reader/2006/generalizing-haskell-function-composition/#comment-250 I think you need doubled parens when hiding (.) in the import (the outer ones are part of the hiding syntax, the inner ones refer to the infix composition symbol in parens for lexical reasons). Both hugs and ghci seem to like it this way. (Perhaps something in your text chain snarfed the "redundant" parens?) I think you need doubled parens when hiding (.) in the import (the outer ones are part of the hiding syntax, the inner ones refer to the infix composition symbol in parens for lexical reasons). Both hugs and ghci seem to like it this way. (Perhaps something in your text chain snarfed the “redundant” parens?)

]]>
By: mgsloan http://comonad.com/reader/2006/generalizing-dot/comment-page-1/#comment-44 mgsloan Thu, 01 Feb 2007 07:15:09 +0000 http://comonad.com/reader/2006/generalizing-haskell-function-composition/#comment-44 PS, I don't think it'd be too hard for noobs to learn it. When I was a noob I wondered why this didn't work! PS, I don’t think it’d be too hard for noobs to learn it. When I was a noob I wondered why this didn’t work!

]]>
By: mgsloan http://comonad.com/reader/2006/generalizing-dot/comment-page-1/#comment-43 mgsloan Thu, 01 Feb 2007 07:14:16 +0000 http://comonad.com/reader/2006/generalizing-haskell-function-composition/#comment-43 This was added to The Other Prelude (perhaps one of the reasons it was created). http://www.haskell.org/haskellwiki/The_Other_Prelude Probably inspired by your irc golfings. This was added to The Other Prelude (perhaps one of the reasons it was created).

http://www.haskell.org/haskellwiki/The_Other_Prelude

Probably inspired by your irc golfings.

]]>
By: Edward Kmett http://comonad.com/reader/2006/generalizing-dot/comment-page-1/#comment-3 Edward Kmett Thu, 09 Nov 2006 06:22:54 +0000 http://comonad.com/reader/2006/generalizing-haskell-function-composition/#comment-3 As an aside, the idea came from observing the fact that <a href="http://www.cse.unsw.edu.au/~dons/lambdabot.html" rel="nofollow">lambdabot</a>'s pointfree conversion command @pl had taken to using `fmap` instead of (.) in a lot of places. As an aside, the idea came from observing the fact that lambdabot’s pointfree conversion command @pl had taken to using `fmap` instead of (.) in a lot of places.

]]>