1. 02 Apr, 2012 1 commit
  2. 24 Mar, 2012 1 commit
  3. 18 Mar, 2012 1 commit
  4. 16 Feb, 2012 1 commit
  5. 17 Jan, 2012 1 commit
  6. 12 Jan, 2012 1 commit
    • Simon Peyton Jones's avatar
      Implememt -fdefer-type-errors (Trac #5624) · 5508ada4
      Simon Peyton Jones authored
      This patch implements the idea of deferring (most) type errors to
      runtime, instead emitting only a warning at compile time.  The
      basic idea is very simple:
      
       * The on-the-fly unifier in TcUnify never fails; instead if it
         gets stuck it emits a constraint.
      
       * The constraint solver tries to solve the constraints (and is
         entirely unchanged, hooray).
      
       * The remaining, unsolved constraints (if any) are passed to
         TcErrors.reportUnsolved.  With -fdefer-type-errors, instead of
         emitting an error message, TcErrors emits a warning, AND emits
         a binding for the constraint witness, binding it
         to (error "the error message"), via the new form of evidence
         TcEvidence.EvDelayedError.  So, when the program is run,
         when (and only when) that witness is needed, the program will
         crash with the exact same error message that would have been
         given at compile time.
      
      Simple really.  But, needless to say, the exercise forced me
      into some major refactoring.
      
       * TcErrors is almost entirely rewritten
      
       * EvVarX and WantedEvVar have gone away entirely
      
       * ErrUtils is changed a bit:
           * New Severity field in ErrMsg
           * Renamed the type Message to MsgDoc (this change
             touches a lot of files trivially)
      
       * One minor change is that in the constraint solver we try
         NOT to combine insoluble constraints, like Int~Bool, else
         all such type errors get combined together and result in
         only one error message!
      
       * I moved some definitions from TcSMonad to TcRnTypes,
         where they seem to belong more
      5508ada4
  7. 19 Dec, 2011 1 commit
    • Ian Lynagh's avatar
      Add a class HasDynFlags(getDynFlags) · 06c6d970
      Ian Lynagh authored
      We no longer have many separate, clashing getDynFlags functions
      
      I've given each GhcMonad its own HasDynFlags instance, rather than
      using UndecidableInstances to make a GhcMonad m => HasDynFlags m
      instance.
      06c6d970
  8. 28 Nov, 2011 1 commit
    • Ian Lynagh's avatar
      Implement a capi calling convention; fixes #2979 · 36f8cabe
      Ian Lynagh authored
      In GHC, this provides an easy way to call a C function via a C wrapper.
      This is important when the function is really defined by CPP.
      
      Requires the new CApiFFI extension.
      
      Not documented yet, as it's still an experimental feature at this stage.
      36f8cabe
  9. 25 Nov, 2011 1 commit
  10. 23 Nov, 2011 1 commit
  11. 18 Nov, 2011 1 commit
    • Simon Marlow's avatar
      Track #included files for recompilation checking (#4900, #3589) · 3f34e091
      Simon Marlow authored
      This was pretty straightforward: collect the filenames in the lexer,
      and add them in to the tcg_dependent_files list that the typechecker
      collects.
      
      Note that we still don't get #included files in the ghc -M output.
      Since we don't normally lex the whole file in ghc -M, this same
      mechanism can't be used directly.
      3f34e091
  12. 11 Nov, 2011 1 commit
    • dreixel's avatar
      New kind-polymorphic core · 09015be8
      dreixel authored
      This big patch implements a kind-polymorphic core for GHC. The current
      implementation focuses on making sure that all kind-monomorphic programs still
      work in the new core; it is not yet guaranteed that kind-polymorphic programs
      (using the new -XPolyKinds flag) will work.
      
      For more information, see http://haskell.org/haskellwiki/GHC/Kinds
      09015be8
  13. 09 Nov, 2011 1 commit
  14. 25 Oct, 2011 2 commits
  15. 10 Oct, 2011 1 commit
  16. 29 Sep, 2011 1 commit
  17. 27 Sep, 2011 1 commit
  18. 06 Sep, 2011 1 commit
    • batterseapower's avatar
      Implement -XConstraintKind · 9729fe7c
      batterseapower authored
      Basically as documented in http://hackage.haskell.org/trac/ghc/wiki/KindFact,
      this patch adds a new kind Constraint such that:
      
        Show :: * -> Constraint
        (?x::Int) :: Constraint
        (Int ~ a) :: Constraint
      
      And you can write *any* type with kind Constraint to the left of (=>):
      even if that type is a type synonym, type variable, indexed type or so on.
      
      The following (somewhat related) changes are also made:
       1. We now box equality evidence. This is required because we want
          to give (Int ~ a) the *lifted* kind Constraint
       2. For similar reasons, implicit parameters can now only be of
          a lifted kind. (?x::Int#) => ty is now ruled out
       3. Implicit parameter constraints are now allowed in superclasses
          and instance contexts (this just falls out as OK with the new
          constraint solver)
      
      Internally the following major changes were made:
       1. There is now no PredTy in the Type data type. Instead
          GHC checks the kind of a type to figure out if it is a predicate
       2. There is now no AClass TyThing: we represent classes as TyThings
          just as a ATyCon (classes had TyCons anyway)
       3. What used to be (~) is now pretty-printed as (~#). The box
          constructor EqBox :: (a ~# b) -> (a ~ b)
       4. The type LCoercion is used internally in the constraint solver
          and type checker to represent coercions with free variables
          of type (a ~ b) rather than (a ~# b)
      9729fe7c
  19. 05 Aug, 2011 1 commit
  20. 03 Aug, 2011 1 commit
  21. 14 Jul, 2011 4 commits
  22. 13 Jul, 2011 1 commit
  23. 11 Jul, 2011 1 commit
  24. 18 Jun, 2011 1 commit
  25. 13 Jun, 2011 1 commit
  26. 09 Jun, 2011 1 commit
    • Ian Lynagh's avatar
      Refactor SrcLoc and SrcSpan · b2bd63f9
      Ian Lynagh authored
      The "Unhelpful" cases are now in a separate type. This allows us to
      improve various things, e.g.:
      * Most of the panic's in SrcLoc are now gone
      * The Lexer now works with RealSrcSpans rather than SrcSpans, i.e. it
        knows that it has real locations and thus can assume that the line
        number etc really exists
      * Some of the more suspicious cases are no longer necessary, e.g.
        we no longer need this case in advanceSrcLoc:
            advanceSrcLoc loc _ = loc -- Better than nothing
      
      More improvements can probably be made, e.g. tick locations can
      probably use RealSrcSpans too.
      b2bd63f9
  27. 15 May, 2011 2 commits
  28. 28 Apr, 2011 2 commits
  29. 26 Apr, 2011 1 commit
  30. 12 Apr, 2011 1 commit
  31. 16 Jan, 2011 1 commit
    • Iavor S. Diatchki's avatar
      Add basic support for number type literals. · 9cbc204d
      Iavor S. Diatchki authored
      We add a new kind, Nat, inhabited by a family of types,
      one for each natural number:
      
      0, 1, 2 .. :: Nat
      
      In terms of GHC's sub-kind relation, Nat is only a sub-kind of itself.
      
      The numeric types are empty because there are no primitives of these
      types, and the kind "Nat" is not related to *, the kind of types which
      can be defined in Haskell programs.
      9cbc204d
  32. 05 Nov, 2010 1 commit
    • vivian's avatar
      multiline commands in GHCi #4316 · 4edbeb14
      vivian authored
      This patch adds support for multiline commands in GHCi.
      
      The first line of input is lexed.  If there is an active
      layout context once the lexer reaches the end of file, the
      user is prompted for more input.
      
      Multiline input is exited by an empty line and can be escaped 
      with a user interrupt.
      
      Multiline mode is toggled with `:set +m`
      4edbeb14
  33. 30 Nov, 2010 1 commit
  34. 01 Dec, 2010 1 commit