>> Use fewer brackets: ok
>> Lambda shift: no
>> eta-reduce: do not do it unless the point-less abstraction makes
>> sense. (that is, almost never)
>> fromMaybe: ok
>> (:) : ok
>> use a list comprehension: ok
>> print: ok
>> unwords: ok
>> liftM: use <$> (or fmap) instead
>
> I don't follow; what's wrong with liftM? It's pretty clear and common.

It is pretty uncommon in Yi sources. It is also an ugly thing: it requires
the Monadic class instead of the more basic Functor. It is a workaround
the hack that Monad is not a subclass of Functor. We should make Monad
instances Functors.

>> const: no
>
> The list ones look much like the ones already taken care of previously...

Yep, see my previous comment to see what I had to say about that.

>
>> on: ok
>> concatMap: ok
>> use a string literal: no
>
> I guess those are the ones like:
> ./Yi/Main.hs:110:1: Use a string literal
> Found:
>  ['l']
> Why not:
>  "l"


> Why not? a -l String is what one is matching on, not a Char.

The option matches either of the Chars. Making it a string obscures that point.

> That's
> even clearer for ones like:

> ./Yi/Keymap/Mg.hs:610:1: Use a string literal
> Found:
>  ['\n', '\r']
> Why not:
>  "\n\r"

Ditto.

>> use when: ok
>> use list literal: not applicable in the sole case we have ;)
>
> A bug, then?

It does not see the preprocessor directives... So, yes and no.

Cheers,
-- JP

--~--~---------~--~----~------------~-------~--~----~
Yi development mailing list
yi-devel@googlegroups.com
http://groups.google.com/group/yi-devel
-~----------~----~----~----~------~----~------~--~---

Reply via email to