1. 16 Jan, 2012 9 commits
  2. 13 Jan, 2012 18 commits
  3. 08 Dec, 2011 2 commits
    • Iustin Pop's avatar
      Some small test simplifications · ba1260ba
      Iustin Pop authored
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
    • 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
      - '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>
  4. 17 Nov, 2011 2 commits
  5. 16 Nov, 2011 4 commits
  6. 26 Oct, 2011 1 commit
  7. 03 Oct, 2011 3 commits
  8. 29 Sep, 2011 1 commit
    • Iustin Pop's avatar
      Change type of Cluster.AllocSolution · 129734d3
      Iustin Pop authored
      Originally, this data type was used both by instance allocation (1
      result), and by instance relocation (many results, one per
      instance). As such, the field 'asSolutions' was a list, and the
      various code paths checked whether the length of the list matches the
      current mode. This is very ugly, as we can't guarantee this matching
      via the type system; hence the FIXME in the code.
      However, commit 6804faa0
       removed the instance evacuation code, and thus
      we now always use just one allocation solution. Hence we can change
      the data type to a simply Maybe type, and get rid of many 'otherwise
      barf out' conditions.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarAgata Murawska <agatamurawska@google.com>