Ingore automatically generated tools/shebang

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Niklas Hambuechen <niklash@google.com>
Utils: Update Attoparsec import

The module Data.Attoparsec is deprecated in attoparsec 0.12
and Data.Attoparsec.ByteString is the recommended replacement,
which is backwards compatible until attoparsec 0.10 (2011),
the oldest package available in the Debians.

Signed-off-by: Niklas Hambuechen <niklash@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
QuickCheck 2.7 compatibility

This makes our test compile with out errors with QuickCheck 2.7.
Warnings about the deprecation of printTestCase remain when using 2.7.

This change is backwards-compatible with all older versions of QuickCheck
that we support.

In 2.7, Property is no longer a monad, but remains a `Gen Prop` inside,
so that we only have to use combinations of `property` and `return`
to become compatible.

See
  https://hackage.haskell.org/package/QuickCheck-2.7.6/changelog

Further, in QuickCheck 2.7, Positive/NonZero/NonNegative are no longer
instances of `Integral` (NonNegative could likely still be one, see
https://github.com/nick8325/quickcheck/issues/31).
Consequently we cannot create them using `fromIntegral` any more,
and switch to `fromEnum` instead, which also is backwards-compatible.

Signed-off-by: Niklas Hambuechen <niklash@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Fix hlint warnings found by hlint 1.9.11

Our current hlint version cannot find them yet.

Signed-off-by: Niklas Hambuechen <niklash@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Always OutDate() the lu's config

For historic reasons, each job has two, potentially
different, configuration references: one of the processor
and one for the logical unit. When requesting locks,
make sure we also out date the configuration of the logical
unit. Note that out dating is cheap as it only sets a flag
in the configuration; the actual refetch only happens
on next read access.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Add cabal file generation to Makefile.am

Modules and executables are automatically generated;
executables are symlinked in an apps/ directory to avoid repeated
compilation as explained in:

  http://stackoverflow.com/a/6711739/263061
  http://stackoverflow.com/q/12305970/263061
Cabal: Remove unused packages

Found with the `packunused` tool.
Cabal: Allow json-0.8
Cabal: Allow attoparsec <= 0.12 and lens <= 4.3
Cabal: Allow network <= 2.6

Both network-2.5.0.0 and network-2.6.0.2 were tested to compile fine.
Cabal: Relax lower bounds

I've tested those with our buildbot.
Cabal: Make modules placeholder a comment
WIP: Generate MIN_VERSION_* macros with cabal
Full QuickCheck 2.7 compatibility

Rename `printTestCase` to `counterexample`, add CPP-guarded alias for
QuickCheck < 2.7.
Cabal: Allow QuickCheck 2.7
Make hlint respect MIN_VERSION_* macros

This change requires hlint >= 1.8.60 for the --cpp-file option.