Switch branches/tags
Commits on Apr 23, 2012
  1. Simplify simplifyInfer quite a lot

    simonpj committed Apr 23, 2012
    Work in progress, on branch
Commits on Apr 22, 2012
  1. Make simplifyInfer generalise only over simple class constraints

    simonpj committed Apr 22, 2012
    So we never infer
       f :: Eq (Tree a) => blah
    when there isn't an instance for Eq (Tree a).
    This fixes Trac #6022.
    It does represent a change in behaviour: certain (bizarre) programs
    will be rejected that were previously accepted. Specifically, if you
       module A where
       f x = ...somethign needing (C T)...
       moudule B where
       import A
       instance C T
       test = f True
    Here the (C T) instance is provided "later".  But this is wierd; it
    would be better to give a type signature for f
       f :: C T => Bool -> Bool
    and then you'd be fine.
  2. Respect kind-variable scoping when instantiating dfuns

    simonpj committed Apr 22, 2012
    Fixes Trac #6020
  3. Empty data types should not be "trimmed" by TidyPgm

    simonpj committed Apr 22, 2012
    That in turn means that you can derive Show etc in other modules,
    fixing Trac #6031
Commits on Apr 21, 2012
  1. OS X: disable bootstrapping info for 'ar'

    mchakravarty committed Apr 21, 2012
    Xcode 4.3 installs the command line tools in a different location as earlier versions of Xcode. With the bootstrapping info, the build fails if the bootstrap compiler was built with an older version of Xcode.
Commits on Apr 20, 2012
  1. Comments only

    simonpj committed Apr 20, 2012
  2. Do SCC on instance declarations (fixes Trac #5715)

    simonpj committed Apr 20, 2012
    The trouble here is that given
        {-# LANGUAGE DataKinds, TypeFamilies #-}
        data instance Foo a = Bar (Bar a)
    we want to get a sensible message that we can't use the promoted 'Bar'
    constructor until after its definition; it's a staging error.  Bud the
    staging mechanism that we use for vanilla data declarations don't work
    Solution is to perform strongly-connected component analysis on the
    instance declarations. But that in turn means that we need to track
    free-variable information on more HsSyn declarations, which is why
    so many files are touched.  All the changes are boiler-platey except
    the ones in TcInstDcls.
Commits on Apr 19, 2012
Commits on Apr 16, 2012
  1. Simplify the typechecking of RULES

    simonpj committed Apr 16, 2012
    Not only does this fix Trac #5853, but it also eliminate
    the horrid SimplEqsOnly part of the constraint simplifier.
    The new plan is described in TcRules
     Note [Simplifying RULE constraints]
  2. Simplify construction of equality predicates

    simonpj committed Apr 16, 2012
    There was an ASSERT which does not hold during type checking (and
    should not) which is later checked by Core Lint
  3. Bytecode assembler refactoring.

    pcapriotti committed Apr 5, 2012
    Use a free monad to specify the assembling procedure, so that it can be
    run multiple times without producing side effects.
    This paves the way for a more general implementation of variable-sized
    instructions, since we need to dry-run the bytecode assembler to
    determine the size of the operands for some instructions.
  4. Support large SLIDE instructions.

    pcapriotti committed Apr 5, 2012
    The bytecode generator used to keep track of the stack depth with a
    16-bit counter, which could overflow for very large BCOs, resulting in
    incorrect bytecode.
    This commit switches to a word-sized counter, and eagerly panics
    whenever an operand is too big, instead of truncating the result.
    This allows us to work around the 16-bit limitation in the case of SLIDE
    instructions, since we can simply factor it into multiple SLIDEs with
    smaller arguments.
Commits on Apr 13, 2012
  1. Allow kind-variable binders in type signatures

    simonpj committed Apr 13, 2012
    This is the last major addition to the kind-polymorphism story,
    by allowing (Trac #5938)
     type family F a   -- F :: forall k. k -> *
     data T a          -- T :: forall k. k -> *
     type instance F (T (a :: Maybe k)) = Char
    The new thing is the explicit 'k' in the type signature on 'a',
    which itself is inside a type pattern for F.
    Main changes are:
    * HsTypes.HsBSig now has a *pair* (kvs, tvs) of binders,
      the kind variables and the type variables
    * extractHsTyRdrTyVars returns a pair (kvs, tvs)
      and the function itself has moved from RdrHsSyn to RnTypes
    * Quite a bit of fiddling with
         TcHsType.tcHsPatSigType and tcPatSig
      which have become a bit simpler.  I'm still not satisfied
      though.  There's some consequential fiddling in TcRules too.
    * Removed the unused HsUtils.collectSigTysFromPats
    There's a consequential wibble to Haddock too
  2. Fix worker/wrapper for CPR functions

    simonpj committed Apr 13, 2012
    A long-standing and egregious bug in the worker/wrapper code meant
    that some functions with the CPR property weren't getting a CPR
    w/w. And that had the effect of making a tail-recursive function not
    tail recursive.  As well as increasing allocation.
    Fixes Trac #5920, and #5997.
    Nofib results (highlights):
            Program           Size    Allocs   Runtime   Elapsed  TotalMem
             boyer2          -0.1%    -15.3%      0.01      0.01     +0.0%
            mandel2          -0.0%     -8.1%      0.01      0.01     +0.0%
               para          -0.1%    -11.8%     -7.9%     -7.8%     +0.0%
                Min          -0.1%    -15.3%     -7.9%     -7.8%    -33.3%
                Max          +0.0%     +0.2%     +6.3%     +6.3%     +3.7%
     Geometric Mean          -0.0%     -0.4%     +0.1%     +0.1%     -0.5%
    Looks like a clear win.  And I have not even recompiled the libraries, so
    it'll probably be a bit better in the ed.
  3. Allow overlaps when -XIncoherentInstances is in force

    simonpj committed Apr 13, 2012
    This change allows a top-level instance to be used even if there is
    a (potentially) overlapping local given.  Which isn't fab, but it is
    what IncoherentInstances is *for*.
    This fixes the bug part of Trac #6002.
  4. Untabify HsTypes

    simonpj committed Apr 13, 2012
  5. Revert "Added ':runmonad' command to GHCi"

    simonpj committed Apr 13, 2012
    Two problems, for now at any rate
      a) Breaks the build with lots of errors like
            No instance for (Show (IO ())) arising from a use of `print'
      b) Discussion of the approache hasn't converged yet
         (Simon M had a number of suggestions)
    This reverts commit eecd7c9.
  6. Added ':runmonad' command to GHCi

    David Terei
    David Terei committed Feb 1, 2012
    This command allows you to lift user stmts in GHCi into an IO monad
    that implements the GHC.GHCi.GHCiSandboxIO type class. This allows for
    easy sandboxing of GHCi using :runmonad and Safe Haskell.
    Longer term it would be nice to allow a more general model for the Monad
    than GHCiSandboxIO but delaying this for the moment.
Commits on Apr 12, 2012
  1. More imporvements to optimisation flag docs.

    David Terei
    David Terei committed Apr 12, 2012