Is 78 characters still a good option? Was: [Haskell-cafe] breaking too long lines

Thomas Davie tom.davie at gmail.com
Sat Apr 25 02:48:16 EDT 2009


On 24 Apr 2009, at 14:37, Loup Vaillant wrote:

> 2009/4/23 Miguel Mitrofanov <miguelimo38 at yandex.ru>:
>> On 23 Apr 2009, at 12:17, Thomas Davie wrote:
>>
>>> Haskell is a very horizontal language, and to limit our horizontal  
>>> space
>>> seems pretty weird.
>>
>> +1. I sometimes use lines up to 200 characters long, when I feel  
>> they would
>> be more readable.
>
> 200 sounds awfully long. Do you have any example?

Sure...

arrow :: forall (~>) b c d e. ( Arrow (~>), Show (d ~> e), Show (c ~>  
d), Show (b ~> c), Show b, Show c, Show d, Show e, Arbitrary (d ~> e),  
Arbitrary (c ~> d), Arbitrary (b ~> c), Arbitrary b, Arbitrary c,  
Arbitrary d, Arbitrary e, EqProp (b ~> e), EqProp (b ~> d), EqProp  
((b,d) ~> c), EqProp ((b,d) ~> (c,d)), EqProp ((b,e) ~> (d,e)), EqProp  
((b,d) ~> (c,e)), EqProp b, EqProp c, EqProp d, EqProp e) => b ~>  
(c,d,e) -> TestBatch

 >.>

In all seriousness though, that one got broken, but I do find that I  
occasionally have lines around 100 characters that just look silly if  
I break them, this is a good example:

             filterNonRoots (GCase e bs    ) = filter ((/= e) <^(&&)^>  
(not . (`elem` bs)))

Bob


More information about the Haskell-Cafe mailing list