Use a version of the coverage condition even with UndecidableInstances.

This fixes bug #1241 and #2247.  When UndecidableInstances are on,
we use the "Liberal Coverage Condition", which is what GHC used to do in
the past.  This is the gist of the check:

class C a b | a -> b
instance theta => C t1 t2

we check that `fvs t2` is a subset of `fd-closure(theta,fvs t1)`.

This is strictly more general than the coverage condition, while
it still guarantees consistency with the FDs of the class.  This
check is completely orthogonal to termination (it by no means guarantees
it).

I am not sure of the role of the "coverage condition" in termination---
the comments suggest that it is important.  This is why, for the moment,
we only use this check when UndecidableInstances are on.
Fixup comment: typos + I had the generalization rule backwards.
Be willing to parse {-# UNPACK #-} without '!'

This change gives a more helpful error message when the
user says    data T = MkT {-# UNPACK #-} Int
which should have a strictness '!' as well. Rather than
just a parse error, we get

  T7562.hs:3:14: Warning:
    UNPACK pragma lacks '!' on the first argument of `MkT'

Fixes Trac #7562
Merge branch 'master' of http://darcs.haskell.org/ghc
Fix up comment:  I was just wrong previously, the original GHC comment on `oclose` is correct.
Fix Trac #7585.

The coercion optimizer was optimizing coercions inside of branched
axiom applications, sometimes invalidating the branch choice within
the axiom application. Now, we check to make sure we are not
invalidating this invariant before proceeding with the optimization.
Better abstraction over run queues.

This adds some new functions: peekRunQueue, promoteInRunQueue,
singletonRunQueue and truncateRunQueue which help abstract away
manual linked list manipulation, making it easier to swap in
a new queue implementation.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Simple heap-based priority queue implementation.

About the simplest thing possible.  We may want to change
the data representation to be more efficient and allow for
changing keys.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Stride scheduling revision 3

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>