1. 01 Sep, 2011 8 commits
    • Simon Peyton Jones's avatar
      Wibble to fix of Trac #5439: deal with the error-recovery case · b5b4aae4
      Simon Peyton Jones authored
      Even if we are recovering from a typecheck error, we should still do
      the right thing for the "closed" flag.  Otherwise we get an assert
      failure, and potentially different behaviour when the user fixes
      the original type error.
      b5b4aae4
    • Simon Marlow's avatar
      Fix #4988: we were wrongly running exception handlers in the · fa71e6c7
      Simon Marlow authored
      maskUninterruptible state instead of ordinary mask, due to a
      misinterpretation of the way the TSO_INTERRUPTIBLE flag works.
      
      Remarkably this must have been broken for quite some time.  Indeed we
      even had a test that demonstrated the wrong behaviour (conc015a) but
      presumably I didn't look hard enough at the output to notice that it
      was wrong.
      fa71e6c7
    • Simon Peyton Jones's avatar
      Two small further extensions to associated types · c27df60d
      Simon Peyton Jones authored
      a) Allow multiple AT decls for in a single instance
      b) Allow a free type parameter to be instantiated
      
      Example   class C a where
                  type T a x :: *
      
      	  data A
                data B
                instance C Int where
                  type T Int A = Int
                  type T Int B = Bool
      
      There is no reason to prohibit this, and as we move
      towards a proper kind system it may even be useful.
      
      I also updated the documentation to cover this change
      and the previous one of allowing free type parameters
      for associated families.
      c27df60d
    • Simon Peyton Jones's avatar
      Fix the trimming of bind_fvs (fixes Trac #5439) · eb46e0de
      Simon Peyton Jones authored
      For the bind_fvs field of FunBind/PatBind, we need to be careful to
      keep track of uses of all functions in this module (although not
      imported ones).  Moreover in TcBinds.decideGeneralisationPlan we
      need to take note of uses of lexically scoped type variables.
      
      These two buglets led to a (useful) assertion failure in TcEnv.
      eb46e0de
    • Simon Peyton Jones's avatar
      Improve debug tracing · 4ea2675c
      Simon Peyton Jones authored
      4ea2675c
    • Simon Peyton Jones's avatar
      Get rid of associated-type default declarations · 5e102e64
      Simon Peyton Jones authored
      We had the idea that you might be able to define
      a default instance for an associated type family, thus:
      
         class C a where
           type T a :: *
           type T a = a -> a
      
      It's an idea that makes sense, but it was only 10% implemented.
      This patch just removes that misleading 10%.
      5e102e64
    • Simon Peyton Jones's avatar
      Comments about type-family parents · 14681f8a
      Simon Peyton Jones authored
      See Note [Associated families and their parent class]
      14681f8a
    • Simon Peyton Jones's avatar
      Allow associated types to have fresh parameters · d2d6bdae
      Simon Peyton Jones authored
      This patch allows
      
           class C a where
             type T a b :: *
           instance C Int
             type T Int b = b -> b
      
      That is, T has a type index 'b' that is not one of the class
      variables.
      
      On the way I did a good deal of refactoring (as usual), especially in
      TcInstDcls.tcLocalInstDecl1, which checks for consistent instantiation
      of the class instance and the type instance.  Less code, more
      expressiveness.  See Note [Checking consistent instantiation]
      d2d6bdae
  2. 31 Aug, 2011 4 commits
  3. 30 Aug, 2011 4 commits
  4. 28 Aug, 2011 1 commit
    • Ian Lynagh's avatar
      By default, be lax about dependencies on GHC · 12646a9c
      Ian Lynagh authored
      There are a number of things which technically depend on GHC (e.g. if
      ghc changes then Haskell files may be compiled differently, or Cabal
      packages may be configured differently). However, in practice, having
      a real dependency on GHC is just a pain: We normally don't want to
      spend time recompiling other things while we're working on the
      compiler, and even if we did, GHC will normally decide compilation
      isn't needed anyway. So by default we use order-only dependencies on
      GHC, i.e. GHC must exist, but if it's newer than other targets then
      rebuilding is not necessary.
      12646a9c
  5. 26 Aug, 2011 5 commits
    • Simon Marlow's avatar
      fix warning · 3a6120a2
      Simon Marlow authored
      3a6120a2
    • Simon Marlow's avatar
      Clean up the handling of the import and :module commands in GHCi · 79d6745f
      Simon Marlow authored
      Previously we remembered the whole history of commands and replayed
      them on every :load/:reload, which lead to some non-linear performance
      characteristics (#5317).  The handling of the implicit Prelude import
      and the implicit imports of recently loaded modules was also
      complicated and wrong in various obscure ways.
      
      The Prelude import works just like the implicit Prelude import in a
      Haskell module: it can be overriden with an explicit Prelude
      import.
      
      I have added a new ":show imports" command to show which imports are
      currently in force.
      
      Prelude> :show imports
      import Prelude -- implicit
      Prelude> import Prelude ()
      Prelude> :show imports
      import Prelude ()
      Prelude> map
      
      <interactive>:0:1: Not in scope: `map'
      Prelude>
      
      Full documentation in the User's Guide.
      
      There are various other little tweaks and improvements, such as when a
      module is imported with 'as', we now show the 'as' name in the prompt
      rather than the original name.
      79d6745f
    • Simon Marlow's avatar
      3b8d1287
    • Simon Marlow's avatar
      export HscEnv · 216091d6
      Simon Marlow authored
      216091d6
    • Ian Lynagh's avatar
      Follow ghc-prim changes · 1b876144
      Ian Lynagh authored
      1b876144
  6. 25 Aug, 2011 18 commits