1. 15 Dec, 2014 9 commits
    • Simon Peyton Jones's avatar
    • Simon Peyton Jones's avatar
      Improve documentation of syntax for promoted lists · a972bddf
      Simon Peyton Jones authored
      THe documentation in 7.9.4 of promoted list and tuple types was
      misleading, which led to Trac #9882.  This patch makes explicit
      that only type-level with two or more elements can have the
      quote omitted.
      a972bddf
    • Simon Peyton Jones's avatar
      Fix dll-split problem with patch 'Make Core Lint check for locally-bound GlobalId' · 3f87866a
      Simon Peyton Jones authored
      The trouble was that my changes made a lot more files transitively link with
      DynFlags, which is the root module for the revolting Windows dll-split stuff.
      
      Anyway this patch fixes it, in a good way:
      
       - Make GHC/Hooks *not* import DsMonad, because DsMonad imports too
         much other stuff (notably tcLookup variants).  Really, Hooks depends
         only on *types* not *code*.
      
       - To do this I need the DsM type, and the types it depends on,
         not to be part of DsMonad.  So I moved it to TcRnTypes, which is
         where the similar pieces for the TcM and IfM monads live.
      
       - We can then delete DsMonad.hs-boot
      
       - There are a bunch of knock-on change, of no great significance
      3f87866a
    • thomasw's avatar
      Fix panic on [t| _ |] (Trac #9879) · 48222831
      thomasw authored
      Summary:
      Type brackets containing a wildcard, e.g. `[t| _ |]`, caused a panic.
      Fix it by disallowing wildcards in type brackets.
      
      Together with D572, this fixes #9879.
      
      Test Plan: new test WildcardInTypeBrackets should pass
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: carter, thomie, monoidal
      
      Differential Revision: https://phabricator.haskell.org/D573
      
      GHC Trac Issues: #9879
      48222831
    • Facundo Domínguez's avatar
      Write release notes for -XStaticPointers. · bd0f9e1f
      Facundo Domínguez authored
      Test Plan: ./validate
      
      Reviewers: goldfire, austin
      
      Reviewed By: austin
      
      Subscribers: mboes, carter, thomie
      
      Differential Revision: https://phabricator.haskell.org/D568
      
      GHC Trac Issues: #7015
      bd0f9e1f
    • Carter Schonwald's avatar
      Changing prefetch primops to have a `seq`-like interface · f44333ea
      Carter Schonwald authored
      Summary:
      The current primops for prefetching do not properly work in pure code;
      namely, the primops are not 'hoisted' into the correct call sites based
      on when arguments are evaluated. Instead, they should use a `seq`-like
      interface, which will cause it to be evaluated when the needed term is.
      
      See #9353 for the full discussion.
      
      Test Plan: updated tests for pure prefetch in T8256 to reflect the design changes in #9353
      
      Reviewers: simonmar, hvr, ekmett, austin
      
      Reviewed By: ekmett, austin
      
      Subscribers: merijn, thomie, carter, simonmar
      
      Differential Revision: https://phabricator.haskell.org/D350
      
      GHC Trac Issues: #9353
      f44333ea
    • Austin Seipp's avatar
      8afdf274
    • Simon Peyton Jones's avatar
      Make Core Lint check for locally-bound GlobalIds · d59c59f4
      Simon Peyton Jones authored
      There should be no bindings in this module for a GlobalId;
      except after CoreTidy, when top-level bindings are globalised.
      
      To check for this, I had to make the CoreToDo pass part of the
      environment that Core Lint caries.  But CoreToDo is defined in
      CoreMonad, which (before this patch) called CoreLint.
      
      So I had to do quite a bit of refactoring, moving some
      lint-invoking code into CoreLint itself.  Crucially, I also
      more tcLookupImported_maybe, importDecl, and checkwiredInTyCon
      from TcIface (which use CoreLint) to LoadIface (which doesn't).
      This is probably better structure anyway.
      
      So most of this patch is refactoring. The actual check for
      GlobalIds is in CoreLint.lintAndScopeId
      d59c59f4
    • Simon Peyton Jones's avatar
      Pattern-synonym matcher and builder Ids must be *LocalIds* · fbb42b2e
      Simon Peyton Jones authored
      This easy-to-make mistake meant that pattern-synonym matcher and
      builder Ids weren't being treated as locally defined by the simpplier.
      That meant that we never looked up them up in the environment, got an
      out-of-date unfolding, which made the Simplifier fall into an infinite
      loop.  This was the cause of Trac #98587, but it was quite tricky to
      find!
      
      In a separate patch I'll make Lint check for locally-bound GlobalIds,
      since they are always an error.
      fbb42b2e
  2. 14 Dec, 2014 10 commits
  3. 13 Dec, 2014 2 commits
    • Sergei Trofimovich's avatar
      Parser: remove unused rule (copy/paste error) · 288c7c6a
      Sergei Trofimovich authored
      Summary:
      Found out when tracking down conflicts reported by happy.
      It was accidentally introduced in large Api Annotations
      patch: 803fc5db
      
      
      
      Before:
        unused rules: 1
        shift/reduce conflicts:  60
        reduce/reduce conflicts: 16
      After:
        shift/reduce conflicts:  60
        reduce/reduce conflicts: 12
      
      Unused rule is seen in happy's --info= output as:
          rule 180 is unused
          ...
          decl_cls -> 'default' infixexp '::' sigtypedoc     (180)
          decl_cls -> 'default' infixexp '::' sigtypedoc     (181)
      
      While at it removed 'q' typo in parser conflict log :)
      Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
      
      Reviewers: simonmar, austin, alanz
      
      Reviewed By: alanz
      
      Subscribers: carter, thomie
      
      Differential Revision: https://phabricator.haskell.org/D569
      288c7c6a
    • eir@cis.upenn.edu's avatar
      reduceTyFamApp_maybe should *not* normalise arguments first. · 3ec93917
      eir@cis.upenn.edu authored
      Doing so made the solver gobble up tons of memory, now that matchFam
      calls reduceTyFamApp_maybe. But, I don't know why, yet! Will
      look more closely at this soon.
      3ec93917
  4. 12 Dec, 2014 2 commits
    • eir@cis.upenn.edu's avatar
      Flat constraint --> Simple constraint · 8a0de692
      eir@cis.upenn.edu authored
      8a0de692
    • eir@cis.upenn.edu's avatar
      Rewrite `Coercible` solver · 0cc47eb9
      eir@cis.upenn.edu authored
      Summary:
      This is a rewrite of the algorithm to solve for Coercible "instances".
      
      A preliminary form of these ideas is at
      https://ghc.haskell.org/trac/ghc/wiki/Design/NewCoercibleSolver
      
      The basic idea here is that the `EqPred` constructor of `PredTree`
      now is parameterised by a new type `EqRel` (where
      `data EqRel = NomEq | ReprEq`). Thus, every equality constraint can
      now talk about nominal equality (the usual case) or representational
      equality (the `Coercible` case).
      
      This is a change from the previous
      behavior where `Coercible` was just considered a regular class with
      a special case in `matchClassInst`.
      
      Because of this change, representational equalities are now
      canonicalized just like nominal ones, allowing more equalities
      to be solved -- in particular, the case at the top of #9117.
      
      A knock-on effect is that the flattener must be aware of the
      choice of equality relation, because the inert set now stores
      both representational inert equalities alongside the nominal
      inert equalities. Of course, we can use representational equalities
      to rewrite only within another representational equality --
      thus the parameterization of the flattener.
      
      A nice side effect of this change is that I've introduced a new
      type `CtFlavour`, which tracks G vs. W vs. D, removing some ugliness
      in the flattener.
      
      This commit includes some refactoring as discussed on D546.
      It also removes the ability of Deriveds to rewrite Deriveds.
      
      This fixes bugs #9117 and #8984.
      
      Reviewers: simonpj, austin, nomeata
      
      Subscribers: carter, thomie
      
      Differential Revision: https://phabricator.haskell.org/D546
      
      GHC Trac Issues: #9117, #8984
      0cc47eb9
  5. 11 Dec, 2014 5 commits
  6. 10 Dec, 2014 12 commits