Issue 373 in xmonad: Hlintify XMonad & XMonadContrib

Status: Accepted Owner: gwern0 Labels: Type-Enhancement Priority-Low Component-Contrib Maintainability Component-Core New issue 373 by gwern0: Hlintify XMonad & XMonadContrib http://code.google.com/p/xmonad/issues/detail?id=373 Hlint (http://community.haskell.org/~ndm/hlint/) is a code-style tool that flags verbose, useless, or otherwise bad bits of code. It would be good if XMC had clean code. (Hlint strives for 'correctness'; none of the changes ought to affect the semantics of the code.) XMonad-core generates roughly 31 suggestions and XMC roughly 468. Even excluding debatable suggestions like eta-reduction, this is a lot of small bad things. Fortunately, they are all generally very easy to fix and understand why the code was flagged, making this a good beginner project. Attached are the 2 HTML reports hlint generates (obviously 31+468 messages is a bit much to paste in). Attachments: core.html 38.5 KB xmc.html 528 KB -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings

Comment #1 on issue 373 by gwern0: Hlintify XMonad & XMonadContrib http://code.google.com/p/xmonad/issues/detail?id=373 I like to think of hlint as -Wall on steroids, if that metaphor helps anyone. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings

Comment #2 on issue 373 by wil...@willem.vanlint.name: Hlintify XMonad & XMonadContrib http://code.google.com/p/xmonad/issues/detail?id=373 I've patched a few of the Hlint flags in xmonad core. It is indeed a nice beginner project, I learned a lot. I left one of the eta reduction warnings in there due to readability and I didn't alter the naming of the atoms to camelCase due to their origin. When applying another eta reduction, I noticed the redundant use was a solution for the monomorphism restriction. This was changed by using scoped type variables also due to the possibility that generalisation isn't done in nested expressions (http://hackage.haskell.org/trac/ghc/blog/LetGeneralisationInGhc7). Any comments on my patch are welcome. Attachments: hlint-fixes.dpatch 14.7 KB
participants (1)
-
codesite-noreply@google.com