1. 01 Oct, 2013 1 commit
  2. 30 Sep, 2013 2 commits
  3. 29 Sep, 2013 1 commit
  4. 24 Sep, 2013 1 commit
  5. 22 Sep, 2013 1 commit
  6. 20 Sep, 2013 5 commits
  7. 18 Sep, 2013 6 commits
    • Simon Peyton Jones's avatar
      07f524cf
    • Jan Stolarek's avatar
      Restore old names of comparison primops · 53948f91
      Jan Stolarek authored
      In 6579a6c7 we removed existing comparison primops and introduced new ones
      returning Int# instead of Bool. This commit (and associated commits in
      array, base, dph, ghc-prim, integer-gmp, integer-simple, primitive, testsuite and
      template-haskell) restores old names of primops. This allows us to keep
      our API cleaner at the price of not having backwards compatibility.
      
      This patch also temporalily disables fix for #8317 (optimization of
      tagToEnum# at Core level). We need to fix #8326 first, otherwise
      our primops code will be very slow.
      53948f91
    • Simon Peyton Jones's avatar
      Accommodate Derived constraints in two places (fix Trac #8129, #8134) · 8cfbdccb
      Simon Peyton Jones authored
      If we have
         class (F a ~ b) => C a b
      then we can produce *derived* CFunEqCans.  These were not being
      treated properly in two places:
      
      a) in TcMType.zonkFlats (Trac #8134)
      b) in TcSMonad.prepareInertsForImplications (Trac #8129)
      
      This patch fixes both.
      8cfbdccb
    • Simon Peyton Jones's avatar
      A little refactoring · a5bdc6b5
      Simon Peyton Jones authored
      * Make isCFunEqCan_maybe return Maybe (TyCon, [Type])
      * Add insertTM, deleteTM to TrieMap
      a5bdc6b5
    • twanvl's avatar
      Implement checkable "minimal complete definitions" (#7633) · bd42c9df
      twanvl authored
      
      
      This commit adds a `{-# MINIMAL #-}` pragma, which defines the possible
      minimal complete definitions for a class. The body of the pragma is a
      boolean formula of names.
      
      The old warning for missing methods is replaced with this new one.
      
      Note: The interface file format is changed to store the minimal complete
      definition.
      Authored-by: twanvl's avatarTwan van Laarhoven <twanvl@gmail.com>
      Signed-off-by: Herbert Valerio Riedel's avatarHerbert Valerio Riedel <hvr@gnu.org>
      bd42c9df
    • eir@cis.upenn.edu's avatar
      Change role annotation syntax. · f4046b50
      eir@cis.upenn.edu authored
      This fixes bugs #8185, #8234, and #8246. The new syntax is explained
      in the comments to #8185, appears in the "Roles" subsection of the
      manual, and on the [wiki:Roles] wiki page.
      
      This change also removes the ability for a role annotation on type
      synonyms, as noted in #8234.
      f4046b50
  8. 16 Sep, 2013 1 commit
  9. 14 Sep, 2013 1 commit
  10. 13 Sep, 2013 5 commits
    • Joachim Breitner's avatar
      Fix rebase fallout · 8b9f71ee
      Joachim Breitner authored
      To push what was validated, not just what was commited.
      8b9f71ee
    • Joachim Breitner's avatar
      Introduce coerce :: Coercible a b -> a -> b · 17a868af
      Joachim Breitner authored
      This is the result of the design at
      http://ghc.haskell.org/trac/ghc/wiki/NewtypeWrappers
      
      The goal is to be able to convert between, say [First Int] and [Last
      Int] with zero run-time overhead. To that end, we introduce a special
      two parameter type class Coercible whose instances are created
      automatically and on-the fly. This relies on and exploits the recent
      addition of roles to core.
      17a868af
    • Joachim Breitner's avatar
      Expose tcTyConsOfType as Types.tyConsOfType · 638da2fe
      Joachim Breitner authored
      and add related function tyConsOfTyCon.
      638da2fe
    • Joachim Breitner's avatar
      Expose more in the TcS monad · 81928d04
      Joachim Breitner authored
      in preparation for the Coercible class implementation.
      81928d04
    • Iavor S. Diatchki's avatar
      Add support for evaluation of type-level natural numbers. · 1f77a534
      Iavor S. Diatchki authored
      This patch implements some simple evaluation of type-level expressions
      featuring natural numbers.  We can evaluate *concrete* expressions that
      use the built-in type families (+), (*), (^), and (<=?), declared in
      GHC.TypeLits.   We can also do some type inference involving these
      functions.  For example, if we encounter a constraint such as `(2 + x) ~ 5`
      we can infer that `x` must be 3.  Note, however, this is used only to
      resolve unification variables (i.e., as a form of a constraint improvement)
      and not to generate new facts.  This is similar to how functional
      dependencies work in GHC.
      
      The patch adds a new form of coercion, `AxiomRuleCo`, which makes use
      of a new form of axiom called `CoAxiomRule`.  This is the form of evidence
      generate when we solve a constraint, such as `(1 + 2) ~ 3`.
      
      The patch also adds support for built-in type-families, by adding a new
      form of TyCon rhs: `BuiltInSynFamTyCon`.  such built-in type-family
      constructors contain a record with functions that are used by the
      constraint solver to simplify and improve constraints involving the
      built-in function (see `TcInteract`).  The record in defined in `FamInst`.
      
      The type constructors and rules for evaluating the type-level functions
      are in a new module called `TcTypeNats`.
      1f77a534
  11. 12 Sep, 2013 1 commit
    • Austin Seipp's avatar
      Implement the AMP warning (#8004) · 75a9664a
      Austin Seipp authored
      
      
      This patch implements a warning when definitions conflict with the
      Applicative-Monad Proposal (AMP), described in #8004. Namely, this will
      cause a warning iff:
      
          * You have an instance of Monad, but not Applicative
          * You have an instance of MonadPlus, but not Alternative
          * You locally defined a function named join, <*>, or pure.
      
      In GHC 7.10, these warnings will actually be enforced with superclass
      constraints through changes in base, so programs will fail to compile
      then.
      
      This warning is enabled by default. Unfortunately, not all of
      our upstream libraries have accepted the appropriate patches. So we
      temporarily fix ./validate by ignoring the AMP warning.
      
      Dan Rosén made an initial implementation of this change, and the
      remaining work was finished off by David Luposchainsky. I finally made
      some minor refactorings.
      Authored-by: danr's avatarDan Rosén <danr@chalmers.se>
      Authored-by: quchen's avatarDavid Luposchainsky <dluposchainsky@gmail.com>
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      75a9664a
  12. 11 Sep, 2013 1 commit
  13. 10 Sep, 2013 4 commits
    • nfrisby's avatar
      factor 'tcRnModuleTcRnM' out of 'tcRnModule' and export it · 850490af
      nfrisby authored
      'tcRnModuleTcRnM' builds the TcRnM monad computation that is the bulk of
      'tcRnModule'
      
      This commit makes it simpler for courageous Core plugins to invoke the
      typechecker. In particular, they no longer need to copy-and-paste what is now
      the body of 'tcRnModuleTcRnM'. The key change is that the 'tcRnModuleTcRnM'
      computation can be run with (a hypothetical) 'initTcFromCoreM' instead of
      'initTc'.
      850490af
    • Simon Peyton Jones's avatar
      Improve error reporting for "relevant bindings" again (Trac #8233) · 9039108b
      Simon Peyton Jones authored
      This patch makes a number of related improvements:
      
      * Displays relevant bindings in innermost-first order.
        The inner ones are closer to the error.
      
      * Does not display syntactically top-level bindings,
        unless you say -fno-max-relevant-bindings.
        This is what Trac #8233 was mainly about
      
      * Makes the TopLevelFlag in a TcIdBinder really mean
        "syntactically top level".  It was a bit vague before.
      
      There was some associated simplification, because we no longer
      need to pas a TopLevelFlag to tcMonoBinds and friends.
      9039108b
    • Simon Peyton Jones's avatar
      Improve the insolubility check when quantifying · e365d496
      Simon Peyton Jones authored
      See Note [Quantification with errors]
      Fixes Trac #8262
      e365d496
    • Simon Peyton Jones's avatar
      Comments only · dc8b06e8
      Simon Peyton Jones authored
      dc8b06e8
  14. 09 Sep, 2013 1 commit
  15. 06 Sep, 2013 1 commit
    • thoughtpolice's avatar
      Add basic support for GHCJS · b372e8ea
      thoughtpolice authored
      
      
      This patch encompasses most of the basic infrastructure for GHCJS. It
      includes:
      
        * A new extension, -XJavaScriptFFI
        * A new architecture, ArchJavaScript
        * Parser and lexer support for 'foreign import javascript', only
          available under -XJavaScriptFFI, using ArchJavaScript.
        * As a knock-on, there is also a new 'WayCustom' constructor in
          DynFlags, so clients of the GHC API can add custom 'tags' to their
          built files. This should be useful for other users as well.
      
      The remaining changes are really just the resulting fallout, making sure
      all the cases are handled appropriately for DynFlags and Platform.
      Authored-by: Luite Stegeman's avatarLuite Stegeman <stegeman@gmail.com>
      Signed-off-by: thoughtpolice's avatarAustin Seipp <aseipp@pobox.com>
      b372e8ea
  16. 04 Sep, 2013 3 commits
  17. 03 Sep, 2013 1 commit
  18. 02 Sep, 2013 1 commit
    • Simon Peyton Jones's avatar
      Make Specialise close over kind variables (fixes Trac #8196) · 8d7dd547
      Simon Peyton Jones authored
      This is a lingering bug from the introduction of polymorphic kinds.
      In the specialiser we were specialising over a type, but failing
      to specialise over the kinds it mentions.
      
      The fix is simple: add a call to closeOverKinds.
      
      Most of the patch is to add closeOverKinds, and to use it in a few
      other places where we are doing essentially the same thing.
      8d7dd547
  19. 29 Aug, 2013 2 commits
  20. 28 Aug, 2013 1 commit