1. 31 Jul, 2013 1 commit
    • ian@well-typed.com's avatar
      Add NegativeLiterals extension · ef739635
      ian@well-typed.com authored
      I'd been meaning to do this for some time, but finally got around to it
      due to the overflowing literals warning. With that enabled, we were
      getting a warning for
          -128 :: Int8
      as that is parsed as
          negate (fromInteger 128)
      which just happens to do the right thing, as
          negate (fromInteger 128) = negate (-128) = -128
      ef739635
  2. 18 Mar, 2013 1 commit
  3. 26 Feb, 2013 1 commit
  4. 25 Feb, 2013 1 commit
  5. 14 Dec, 2012 1 commit
  6. 16 Oct, 2012 1 commit
    • ian@well-typed.com's avatar
      Some alpha renaming · cd33eefd
      ian@well-typed.com authored
      Mostly d -> g (matching DynFlag -> GeneralFlag).
      Also renamed if* to when*, matching the Haskell if/when names
      cd33eefd
  7. 26 Sep, 2012 1 commit
  8. 03 Sep, 2012 1 commit
  9. 24 Jul, 2012 1 commit
  10. 16 Jul, 2012 3 commits
  11. 15 Jul, 2012 1 commit
  12. 14 Jul, 2012 1 commit
  13. 29 Jun, 2012 1 commit
  14. 12 Jun, 2012 2 commits
    • Ian Lynagh's avatar
      Pass DynFlags down to mk_err_msg · c3a62c56
      Ian Lynagh authored
      c3a62c56
    • Simon Peyton Jones's avatar
      Revive 'mdo' expressions, per discussion in Trac #4148 · 4f8e86b4
      Simon Peyton Jones authored
      Summary:
        - mdo expressions are enabled by RecursiveDo pragma
      
        - mdo expressions perform full segmentation
      
        - 'rec' groups inside 'do' are changed so they do *not*
          perform any segmentation.
      
        - Both 'mdo' and 'rec' are enabled by 'RecursiveDo'
          'DoRec' is deprecated in favour of 'RecursiveDo'
          (The 'rec' keyword is also enabled by 'Arrows', as now.)
      
      Thanks to Levent for doing all the work
      4f8e86b4
  15. 14 May, 2012 1 commit
    • Ian Lynagh's avatar
      Tweak the lexer: In particular, improve notFollowedBy and friends · c250f93b
      Ian Lynagh authored
      We were hitting a problem when reading the LANGUAGE/OPTIONS pragmas
      from GHC.TypeLits, where the buffer ended "{-". The rules for the
      start-comment lexeme check that "{-" is not followed by "#", but the
      test returned False when there was no next character. Therefore we
      were lexing this as as an open-curly lexeme (only consuming the "{",
      and not reaching the end of the buffer),
      which meant the options parser think that it had reached the end of
      the options.
      
      Now we correctly lex as "{-".
      c250f93b
  16. 02 Apr, 2012 1 commit
  17. 24 Mar, 2012 1 commit
  18. 18 Mar, 2012 1 commit
  19. 16 Feb, 2012 1 commit
  20. 17 Jan, 2012 1 commit
  21. 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
  22. 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
  23. 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
  24. 25 Nov, 2011 1 commit
  25. 23 Nov, 2011 1 commit
  26. 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
  27. 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
  28. 09 Nov, 2011 1 commit
  29. 25 Oct, 2011 2 commits
  30. 10 Oct, 2011 1 commit
  31. 29 Sep, 2011 1 commit
  32. 27 Sep, 2011 1 commit
  33. 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
  34. 05 Aug, 2011 1 commit
  35. 03 Aug, 2011 1 commit
  36. 14 Jul, 2011 1 commit
    • Ian Lynagh's avatar
      Separate the warning flags into their own datatype · 493ea4ab
      Ian Lynagh authored
      The -w flag wasn't turning off a few warnings (Opt_WarnMissingImportList,
      Opt_WarnMissingLocalSigs, Opt_WarnIdentities). Rather than just adding
      them, I've separated the Opt_Warn* contructors off into their own type,
      so -w now just sets the list of warning flags to [].
      493ea4ab