1. 13 Jan, 2012 4 commits
  2. 11 Jan, 2012 2 commits
  3. 08 Dec, 2011 2 commits
    • Iustin Pop's avatar
      Cleanup hlint errors · 3603605a
      Iustin Pop authored
      
      
      First, we update the recommended hlint version to what I used to get a
      clean output (1.8.15). Most of the changes are:
      
      - remove unneeded parentheses
      - some simplifications (intercalate " " → unwords, maybe … id →
        fromMaybe, etc.)
      - removal of some duplicate code (in previous patches)
      
      There are still some warnings which I didn't clean out but plain
      ignored:
      
      - 'Eta reduce' in some specific files, because the type inference
        specialises the function on the first call, and annotating the type
        properly would be too verbose
      - use of 'first', 'comparing', and 'on', since these don't seem to be
        widely or consistently used (outside ganeti/htools, I mean)
      - use of Control.Exception.catch, as we only care about I/O errors; at
        one point yes, we will need to transition to this new API
      - 'Reduce duplication', since hlint warns even for 3 duplicate lines,
        and abstracting that away seems overkill to me
      
      After this patch, make hlint is clean and doesn't exit with an error
      anymore; we could enable it automatically on 'make lint' if hlint is
      detected (future patch).
      
      Note that we explicitly skip the THH.hs file from checking because it
      seems that hlint doesn't parse correctly for now the splice notation.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarAgata Murawska <agatamurawska@google.com>
      3603605a
    • Iustin Pop's avatar
      2f9198be
  4. 18 Nov, 2011 1 commit
    • Iustin Pop's avatar
      htools: adjust imports for newer compilers · 7345b69b
      Iustin Pop authored
      
      
      While testing with ghc 7.2, I saw that some imports we are using are
      very old (from ghc 6.8 time), even though current libraries are using
      different names.
      
      We fix this and bump minimum documented version to ghc 6.12, as I
      don't have 6.10 to test anymore (possibly still works with that
      version, but better safe - both Ubuntu Lucid and Debian Squeeze ship
      with 6.12 nowadays).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      7345b69b
  5. 17 Nov, 2011 1 commit
  6. 16 Nov, 2011 1 commit
  7. 26 Oct, 2011 1 commit
  8. 14 Oct, 2011 2 commits
  9. 03 Oct, 2011 1 commit
  10. 29 Sep, 2011 1 commit
  11. 21 Jul, 2011 3 commits
    • Iustin Pop's avatar
      htools: a few more hlint fixes · 1b0a6356
      Iustin Pop authored
      
      
      Tested only on GHC 7.x, will test on 6.1x too before commit.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      1b0a6356
    • Iustin Pop's avatar
      htools: further docstring fixes · 179c0828
      Iustin Pop authored
      
      
      This adds parameter documentation for Cluster.iMoveToJob (I think it
      was not clear if the new or old node list is needed) and fixes other
      docstring style issues.
      
      After this patch, all modules except for CLI.hs (which has many
      obvious declarations for command-line options) and QC.hs (unittests)
      have 100% doc-strings.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      179c0828
    • Iustin Pop's avatar
      htools: add human-readable output to hspace · 375969eb
      Iustin Pop authored
      
      
      Currently, hspace can only output a machine-readable format that
      (while detailed) is hard to parse quickly by people. This patch adds
      (and enables by default) a human-readable output that shows the most
      important metrics in a simple format.
      
      Most of the work of the patch is in moving the display of various
      metrics from the 'main' function to separate functions, each of which
      can output either a machine or human intended format.
      
      The patch also corrects a bug in the CPU efficiency display: before,
      the efficiency was computed as instance virtual CPUs divided by total
      physical CPUs, which is almost always supra-unitary. More correct is
      to divide by the total virtual CPUs, which shows a more meaningful
      number (when the p-to-v CPU ratio has been defined correctly).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      375969eb
  12. 20 Jul, 2011 1 commit
    • Guido Trotter's avatar
      Do proper name lookup for the -O option · 4938fa30
      Guido Trotter authored
      
      
      hspace and hbal treat -O differently, and use aliases for short names
      (although hbal succeeds in that, and hspace doesn't). Uniform this with
      a name lookup, using the same functions we used for instance
      selection/exclusion.
      
      Some of the code is by the way a bit repetitive, and could probably be
      merged in a single function. That needs to be a monadic one, though, so
      I promise to do it as soon as I realize how to write them! ;)
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      4938fa30
  13. 19 Jul, 2011 2 commits
  14. 15 Jul, 2011 1 commit
  15. 14 Jul, 2011 1 commit
  16. 13 Jul, 2011 3 commits
  17. 28 Jun, 2011 1 commit
  18. 12 Apr, 2011 1 commit