1. 02 May, 2016 5 commits
    • Facundo Domínguez's avatar
      StaticPointers: Allow closed vars in the static form. · 36d29f7c
      Facundo Domínguez authored
      Summary:
      With this patch closed variables are allowed regardless of whether
      they are bound at the top level or not.
      
      The FloatOut pass is always performed. When optimizations are
      disabled, only expressions that go to the top level are floated.
      Thus, the applications of the StaticPtr data constructor are always
      floated.
      
      The CoreTidy pass makes sure the floated applications appear in the
      symbol table of object files. It also collects the floated bindings
      and inserts them in the static pointer table.
      
      The renamer does not check anymore if free variables appearing in the
      static form are top-level. Instead, the typechecker looks at the
      tct_closed flag to decide if the free variables are closed.
      
      The linter checks that applications of StaticPtr only occur at the
      top of top-level bindings after the FloatOut pass.
      
      The field spInfoName of StaticPtrInfo has been removed. It used to
      contain the name of the top-level binding that contains the StaticPtr
      application. However, this information is no longer available when the
      StaticPtr is constructed, as the binding name is determined now by the
      FloatOut pass.
      
      Test Plan: ./validate
      
      Reviewers: goldfire, simonpj, austin, hvr, bgamari
      
      Reviewed By: simonpj
      
      Subscribers: thomie, mpickering, mboes
      
      Differential Revision: https://phabricator.haskell.org/D2104
      
      GHC Trac Issues: #11656
      36d29f7c
    • Ryan Scott's avatar
      Make validDerivPred ignore non-visible arguments to a class type constructor · fa86ac7c
      Ryan Scott authored
      Summary:
      GHC choked when trying to derive the following:
      
      ```
      {-# LANGUAGE GeneralizedNewtypeDeriving #-}
      {-# LANGUAGE PolyKinds #-}
      module Example where
      
      class Category (cat :: k -> k -> *) where
        catId   :: cat a a
        catComp :: cat b c -> cat a b -> cat a c
      
      newtype T (c :: * -> * -> *) a b = MkT (c a b) deriving Category
      ```
      
      Unlike in #8865, where we were deriving `Category` for a concrete type like
      `Either`, in the above example we are attempting to derive an instance of the
      form:
      
      ```
      instance Category * c => Category (T * c) where ...
      ```
      
      (using `-fprint-explicit-kinds` syntax). But `validDerivPred` is checking if
      `sizePred (Category * c)` equals the number of free type variables in
      `Category * c`. But note that `sizePred` counts both type variables //and//
      type constructors, and `*` is a type constructor! So `validDerivPred`
      erroneously rejects the above instance.
      
      The fix is to make `validDerivPred` ignore non-visible arguments to the class
      type constructor (e.g., ignore `*` is `Category * c`) by using
      `filterOutInvisibleTypes`.
      
      Fixes #11833.
      
      Test Plan: ./validate
      
      Reviewers: goldfire, hvr, simonpj, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2112
      
      GHC Trac Issues: #11833
      fa86ac7c
    • Sergei Trofimovich's avatar
    • Sergei Trofimovich's avatar
      glasgow_exts.rst: fix quoting · 81d8a23e
      Sergei Trofimovich authored
      glasgow_exts.rst:6525: WARNING: Inline literal start-string without end-string.
      Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
      81d8a23e
    • Sergei Trofimovich's avatar
      db2bfe00
  2. 01 May, 2016 17 commits
    • Matthew Pickering's avatar
      Make sure record pattern synonym selectors are in scope in GHCi. · cd85dc84
      Matthew Pickering authored
      Beforehand, when a record pattern synonym was defined in GHCi
      the selectors would not be in scope. This is because of `is_sub_bndr`
      in `HscTypes.icExtendGblRdrEnv` was throwing away the selectors.
      
      This was broken by the fix to #10520 but it is easy to resolve.
      
      Reviewers: austin, bgamari, simonpj
      
      Reviewed By: simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2147
      
      GHC Trac Issues: #11985
      cd85dc84
    • niteria's avatar
      Remove unused equivClassesByUniq · ea34f565
      niteria authored
      It uses `eltsUFM` so it can introduce nondeterminism, but it isn't used
      so we can delete it.
      
      Test Plan: it builds
      
      Reviewers: simonpj, goldfire, simonmar, austin, bgamari
      
      Reviewed By: austin, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2161
      
      GHC Trac Issues: #4012
      ea34f565
    • Ryan Scott's avatar
      Export constructors for IntPtr and WordPtr · a28611b1
      Ryan Scott authored
      This finishes what #5529 started by exporting the constructors for
      `IntPtr` and `WordPtr` from `Foreign.Ptr`, allowing them to be used in
      `foreign` declarations.
      
      Fixes #11983.
      
      Test Plan: `make TEST=T11983`
      
      Reviewers: simonpj, hvr, bgamari, austin
      
      Reviewed By: simonpj
      
      Subscribers: simonpj, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2142
      
      GHC Trac Issues: #11983
      a28611b1
    • Ben Gamari's avatar
      deriveConstants: Fix nm advice one last time · ecc06030
      Ben Gamari authored
      Missing a close paren.
      ecc06030
    • Ömer Sinan Ağacan's avatar
      Add T11747 as a test · 11619322
      Ömer Sinan Ağacan authored
      Reviewers: bgamari, austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2163
      
      GHC Trac Issues: #11747
      11619322
    • niteria's avatar
      Remove unused getScopedTyVarBinds · 116d3fe6
      niteria authored
      Test Plan: it compiles
      
      Reviewers: simonpj, austin, goldfire, bgamari, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: thomie, simonmar
      
      Differential Revision: https://phabricator.haskell.org/D2160
      
      GHC Trac Issues: #4012
      116d3fe6
    • Ben Gamari's avatar
      rts/itimer/pthread: Stop timer when ticker is stopped · 999c464d
      Ben Gamari authored
      This reworks the pthread-based itimer implementation to disarm the timer
      when events aren't needed. Thanks to hsyl20 for the nice design.
      
      Test Plan: Validate
      
      Reviewers: hsyl20, simonmar, austin
      
      Reviewed By: simonmar
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2131
      
      GHC Trac Issues: #1623, #11965
      999c464d
    • Ben Gamari's avatar
      Kill Itimer.h · 55f4009e
      Ben Gamari authored
      It declared nothing.
      55f4009e
    • Ben Gamari's avatar
      Catch errors from timerfd_settime · df9b772a
      Ben Gamari authored
      df9b772a
    • Ben Gamari's avatar
      rts: Split up Itimer.c · 65e13f66
      Ben Gamari authored
      This shouldn't have any functional changes. It merely splits up what are
      essentially three distinct codepaths which are melding together with
      CPP.
      
      At the moment I merely #include the implementation to use with CPP
      although this really feels very yucky.
      
      Reviewers: erikd, austin, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2130
      65e13f66
    • Ben Gamari's avatar
      rts: Close livelock window due to rapid ticker enable/disable · 16a51a6c
      Ben Gamari authored
      This fixes #11830, where the RTS would livelock if run with `-I0` due
      to a regression introduced by bbdc52f3.
      The reason for this is that the new codepath introduced a subtle race
      condition:
      
       1. one thread could request that the ticker stop and would block until
          the ticker in fact stopped
       2. meanwhile, another thread could sneak in and restart the ticker
      
      this was implemented in such a way where thread (1) would end up
      blocked forever. The solution here is to simply not block. The worst
      that will happen is that timer fires again, but is ignored since the
      ticker is stopped.
      
      Test Plan:
      Validate, try reproduction case in #11830. Need to find a nice
      testcase.
      
      Reviewers: simonmar, erikd, hsyl20, austin
      
      Reviewed By: erikd, hsyl20
      
      Subscribers: erikd, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2129
      
      GHC Trac Issues: #11830
      16a51a6c
    • niksaz's avatar
      Greater customization of GHCi prompt · 533037cc
      niksaz authored
      This patch is trying to redesign the :set prompt option to take not a
      String but a Haskell function, like [String] -> Int -> IO String, where
      [String] is the list of the names of the currently loaded modules and
      Int is the line number. Currently you may set prompt function with
      **:set promt-function [String] -> Int -> IO String** option and old
      version is also available - :set prompt String.
      
      So, it looks like I've almost completed this patch:
      
      1) Now we have a lot of escape sequences - 13 to be exact. Most of them
         are similar to bash prompt escape sequences. Thus they are quite handy.
      
      2) We may use the special escape sequence to call shell functions, for
         example "%call(ls -l -a)".
      
      3) We may use :set prompt-function to set PFunction to handle prompt.
         It is just [String] -> Int -> IO String.
      
      Reviewers: erikd, austin, mpickering, bgamari
      
      Reviewed By: mpickering, bgamari
      
      Subscribers: mpickering, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2084
      
      GHC Trac Issues: #5850
      533037cc
    • Ben Gamari's avatar
      Bump haddock submodule · 18676a4a
      Ben Gamari authored
      Fixes documentation installation.
      18676a4a
    • Ben Gamari's avatar
      eac69673
    • Erik de Castro Lopo's avatar
      rts: Remove deprecated C type `lnat` · 868d2c47
      Erik de Castro Lopo authored
      Summary:
      The `lnat` type was deprecated in 2012 in commit 41737f12 with
      a note to use `StgWord` instead.
      
      Test Plan: Validate on Linux and OS X
      
      Reviewers: simonmar, austin, Phyx, hvr, bgamari
      
      Reviewed By: simonmar, Phyx, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2164
      868d2c47
    • Tamar Christina's avatar
      Fix aggressive cleanup of T1407 · e6627d1f
      Tamar Christina authored
      Summary:
      The aggressive cleanup routine of T1407 is removing files that don't belong to it.
      Constrain the test to only removing files it should by putting all it's generated
      binaries in it's own output folder.
      
      Test Plan: make test -C testsuite/tests/ghci/linking/dyn
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie, #ghc_windows_task_force
      
      Differential Revision: https://phabricator.haskell.org/D2165
      
      GHC Trac Issues: #1407
      e6627d1f
    • Ömer Sinan Ağacan's avatar
      Typos in DmdAnal · f69e7078
      Ömer Sinan Ağacan authored
      f69e7078
  3. 30 Apr, 2016 5 commits
  4. 29 Apr, 2016 5 commits
  5. 28 Apr, 2016 8 commits