Skip to content
Snippets Groups Projects
  1. Sep 16, 2016
    • Ben Gamari's avatar
      Remove directories from include paths · ea310f99
      Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
      Previously this was a relative path which worked in the GHC tree, but
      failed elsewhere. This caused trouble for out-of-tree users as well as
      Hadrian, which wants to move build artifacts out of the working
      directory. Fixes #8040.
      
      Test Plan: Validate
      
      Reviewers: thomie, austin, snowleopard, hvr
      
      Reviewed By: snowleopard, hvr
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2530
      
      GHC Trac Issues: #8040
      ea310f99
  2. Sep 10, 2016
    • Ryan Scott's avatar
      Remove -flocal-ghci-history from default flags · 7b4bb405
      Ryan Scott authored
      Summary:
      D2461 seemed to (inadvertently, I think) add the
      `-flocal-ghci-history` flag to the list of `defaultFlags` that are enabled
      automatically. As a result, every invocation of `ghci` caused a local GHCi
      history to be saved to the current directory, which probably shouldn't be the
      default.
      
      Test Plan:
      Run `ghci`, observe the lack of a `.ghci_history` file in your
      working directory
      
      Reviewers: austin, thomie, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: ak3n
      
      Differential Revision: https://phabricator.haskell.org/D2520
      
      GHC Trac Issues: #9089
      7b4bb405
  3. Sep 09, 2016
    • Alan Zimmerman's avatar
      Add hook for creating ghci external interpreter · 65d9597d
      Alan Zimmerman authored
      Summary:
      The external interpreter is launched by calling
      'System.Process.createProcess' with a 'CreateProcess' parameter.
      
      The current value for this has the 'std_in', 'std_out' and 'std_err'
      fields use the default of 'Inherit', meaning that the remote interpreter
      shares the stdio with the original ghc/ghci process.
      
      This patch introduces a new hook to the DynFlags, which has an
      opportunity to override the 'CreateProcess' fields, launch the process,
      and retrieve the stdio handles actually used.
      
      So if a ghci external interpreter session is launched from the GHC API
      the stdio can be redirected if required, which is useful for tooling/IDE
      integration.
      
      Test Plan: ./validate
      
      Reviewers: austin, hvr, simonmar, bgamari
      
      Reviewed By: simonmar, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2518
      65d9597d
  4. Sep 03, 2016
  5. Aug 31, 2016
  6. Aug 30, 2016
    • Duncan Coutts's avatar
      Fix handling of package-db entries in .ghc.environment files, etc. · ef784c55
      Duncan Coutts authored and Ben Gamari's avatar Ben Gamari committed
      Previously interpreting the content of the .ghc.env files was done
      after the step that loaded the available package dbs. This meant that
      setting the package db flags was ineffective. This patch moves
      interpreting the env files before loading of the package dbs.
      
      Also, the package-db entries refer to files. Allow spaces in these file
      names. Also treat as comments lines beginning with "--".
      
      These are pretty minor fixes in a feature that up 'til now has been
      essentially unused (witness no bug report about it), so there's very
      low risk here. If we can get this into 8.0.2 then cabal can start
      generating the .ghc.environment files, otherwise it cannot as it needs
      the working package-db entries, to be able to refer to local package
      dbs in the build tree (or cabal nix store).
      
      Test Plan:
      Manually create example .ghc.env files
      run ghci; :show packages
      Done this. It works.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2476
      ef784c55
    • Sergei Trofimovich's avatar
      GhcMake: limit Capability count to CPU count in parallel mode · 9d175605
      Sergei Trofimovich authored
      
      In Trac #9221 one of problems using high --jobs=<N>
      is amount of mutator (or GC) threads we crate.
      
      We use userspace spinning-and-yielding (see ACQUIRE_SPIN_LOCK)
      to acess work stealing queues. In case of
      N-worker-threads > N-CPUs fraction of time when
      thread holding spin lock gets descheduled by kernel
      increases. That causes other threads to waste CPU time
      before giving up CPU.
      
      Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
      
      Test Plan:
      ghc --make -j8 and -j80 have comparable sys time
      on a 8-core system.
      
      Reviewers: austin, gintas, bgamari, simonmar
      
      Reviewed By: bgamari, simonmar
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2482
      
      GHC Trac Issues: #9221
      9d175605
  7. Aug 26, 2016
  8. Aug 22, 2016
  9. Aug 21, 2016
  10. Aug 08, 2016
  11. Aug 05, 2016
  12. Jul 22, 2016
  13. Jul 21, 2016
    • Ömer Sinan Ağacan's avatar
      Implement unboxed sum primitive type · 714bebff
      Ömer Sinan Ağacan authored
      Summary:
      This patch implements primitive unboxed sum types, as described in
      https://ghc.haskell.org/trac/ghc/wiki/UnpackedSumTypes.
      
      Main changes are:
      
      - Add new syntax for unboxed sums types, terms and patterns. Hidden
        behind `-XUnboxedSums`.
      
      - Add unlifted unboxed sum type constructors and data constructors,
        extend type and pattern checkers and desugarer.
      
      - Add new RuntimeRep for unboxed sums.
      
      - Extend unarise pass to translate unboxed sums to unboxed tuples right
        before code generation.
      
      - Add `StgRubbishArg` to `StgArg`, and a new type `CmmArg` for better
        code generation when sum values are involved.
      
      - Add user manual section for unboxed sums.
      
      Some other changes:
      
      - Generalize `UbxTupleRep` to `MultiRep` and `UbxTupAlt` to
        `MultiValAlt` to be able to use those with both sums and tuples.
      
      - Don't use `tyConPrimRep` in `isVoidTy`: `tyConPrimRep` is really
        wrong, given an `Any` `TyCon`, there's no way to tell what its kind
        is, but `kindPrimRep` and in turn `tyConPrimRep` returns `PtrRep`.
      
      - Fix some bugs on the way: #12375.
      
      Not included in this patch:
      
      - Update Haddock for new the new unboxed sum syntax.
      
      - `TemplateHaskell` support is left as future work.
      
      For reviewers:
      
      - Front-end code is mostly trivial and adapted from unboxed tuple code
        for type checking, pattern checking, renaming, desugaring etc.
      
      - Main translation routines are in `RepType` and `UnariseStg`.
        Documentation in `UnariseStg` should be enough for understanding
        what's going on.
      
      Credits:
      
      - Johan Tibell wrote the initial front-end and interface file
        extensions.
      
      - Simon Peyton Jones reviewed this patch many times, wrote some code,
        and helped with debugging.
      
      Reviewers: bgamari, alanz, goldfire, RyanGlScott, simonpj, austin,
                 simonmar, hvr, erikd
      
      Reviewed By: simonpj
      
      Subscribers: Iceland_jack, ggreif, ezyang, RyanGlScott, goldfire,
                   thomie, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D2259
      714bebff
  14. Jul 16, 2016
    • tvv's avatar
      CodeGen: Way to dump cmm only once (#11717) · 1ba79fa4
      tvv authored and Ben Gamari's avatar Ben Gamari committed
      The `-ddump-cmm` put all stages of Cmm processing into one output.
      This patch changes its behavior and adds two more options to make
      Cmm dumping flexible.
      
      - `-ddump-cmm-from-stg` dumps only initial version of  Cmm right after
         STG->Cmm codegen
      - `-ddump-cmm` dumps the final result of the Cmm pipeline processing
      - `-ddump-cmm-verbose` dumps intermediate output of each Cmm pipeline
         step
      - `-ddump-cmm-proc` and `-ddump-cmm-caf` seems were lost. Now enabled
      
      Test Plan: ./validate
      
      Reviewers: thomie, simonmar, austin, bgamari
      
      Reviewed By: thomie, simonmar
      
      Subscribers: simonpj, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2393
      
      GHC Trac Issues: #11717
      1ba79fa4
    • Ben Gamari's avatar
      Log heap profiler samples to event log · a9bc5476
      Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
      Test Plan: Try it
      
      Reviewers: hvr, simonmar, austin, erikd
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1722
      
      GHC Trac Issues: #11094
      a9bc5476
  15. Jul 05, 2016
  16. Jul 01, 2016
  17. Jun 28, 2016
  18. Jun 25, 2016
    • Moritz Angermann's avatar
      Allow building static libs. · 8c1ceddd
      Moritz Angermann authored and Tamar Christina's avatar Tamar Christina committed
      Summary:
      Commit 90538d86, seems to have broken static linking.
      The introduction of `argFixup` in `runLink` rearranges libs, and considers
      anything with an `-l` prefix or `.a` suffix a lib, which fails for libs that are
      just being linked together (e.g. `-o lib.a`).
      
      The proposed solution explicitly checks for the existance of the `-o` flag.
      
      Reviewers: rwbarton, erikd, Phyx, bgamari, austin
      
      Reviewed By: Phyx
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2362
      8c1ceddd
  19. Jun 23, 2016
    • Richard Eisenberg's avatar
      Fix #10963 and #11975 by adding new cmds to GHCi. · 8035d1a5
      Richard Eisenberg authored
      See the user's guide entry or the Note [TcRnExprMode] in TcRnDriver.
      
      Test cases: ghci/scripts/T{10963,11975}
      8035d1a5
    • niteria's avatar
      Provide Uniquable version of SCC · 35d1564c
      niteria authored
      We want to remove the `Ord Unique` instance because there's
      no way to implement it in deterministic way and it's too
      easy to use by accident.
      
      We sometimes compute SCC for datatypes whose Ord instance
      is implemented in terms of Unique. The Ord constraint on
      SCC is just an artifact of some internal data structures.
      We can have an alternative implementation with a data
      structure that uses Uniquable instead.
      
      This does exactly that and I'm pleased that I didn't have
      to introduce any duplication to do that.
      
      Test Plan:
      ./validate
      I looked at performance tests and it's a tiny bit better.
      
      Reviewers: bgamari, simonmar, ezyang, austin, goldfire
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2359
      
      GHC Trac Issues: #4012
      35d1564c
    • Simon Peyton Jones's avatar
      Give lookupGRE_Name a better API · 3e0af469
      Simon Peyton Jones authored
      lookupGRE_Name should return either zero or one GREs, never
      several. This is a consequence of INVARIANT 1 on GlobalRdrEnv.
      
      So it's better if it returns a Maybe; the panic on multiple results
      is put in one place, instead of being scattered or ignored.
      
      Just refactoring, no change in behaviour
      3e0af469
  20. Jun 22, 2016
  21. Jun 18, 2016
  22. Jun 17, 2016
  23. Jun 15, 2016
    • Simon Peyton Jones's avatar
      Major patch to introduce TyConBinder · e368f326
      Simon Peyton Jones authored
      Before this patch, following the TypeInType innovations,
      each TyCon had two lists:
        - tyConBinders :: [TyBinder]
        - tyConTyVars  :: [TyVar]
      
      They were in 1-1 correspondence and contained
      overlapping information.  More broadly, there were many
      places where we had to pass around this pair of lists,
      instead of a single list.
      
      This commit tidies all that up, by having just one list of
      binders in a TyCon:
      
        - tyConBinders :: [TyConBinder]
      
      The new data types look like this:
      
        Var.hs:
           data TyVarBndr tyvar vis = TvBndr tyvar vis
           data VisibilityFlag = Visible | Specified | Invisible
           type TyVarBinder = TyVarBndr TyVar VisibilityFlag
      
        TyCon.hs:
           type TyConBinder = TyVarBndr TyVar TyConBndrVis
      
           data TyConBndrVis
             = NamedTCB VisibilityFlag
             | AnonTCB
      
        TyCoRep.hs:
           data TyBinder
             = Named TyVarBinder
             | Anon Type
      
      Note that Var.TyVarBdr has moved from TyCoRep and has been
      made polymorphic in the tyvar and visiblity fields:
      
           type TyVarBinder = TyVarBndr TyVar VisibilityFlag
              -- Used in ForAllTy
           type TyConBinder = TyVarBndr TyVar TyConBndrVis
              -- Used in TyCon
      
           type IfaceForAllBndr  = TyVarBndr IfaceTvBndr VisibilityFlag
           type IfaceTyConBinder = TyVarBndr IfaceTvBndr TyConBndrVis
               -- Ditto, in interface files
      
      There are a zillion knock-on changes, but everything
      arises from these types.  It was a bit fiddly to get the
      module loops to work out right!
      
      Some smaller points
      ~~~~~~~~~~~~~~~~~~~
      * Nice new functions
          TysPrim.mkTemplateKiTyVars
          TysPrim.mkTemplateTyConBinders
        which help you make the tyvar binders for dependently-typed
        TyCons.  See comments with their definition.
      
      * The change showed up a bug in TcGenGenerics.tc_mkRepTy, where the code
        was making an assumption about the order of the kind variables in the
        kind of GHC.Generics.(:.:).  I fixed this; see TcGenGenerics.mkComp.
      e368f326
    • Simon Peyton Jones's avatar
      Re-add FunTy (big patch) · 77bb0927
      Simon Peyton Jones authored
      With TypeInType Richard combined ForAllTy and FunTy, but that was often
      awkward, and yielded little benefit becuase in practice the two were
      always treated separately.  This patch re-introduces FunTy.  Specfically
      
      * New type
          data TyVarBinder = TvBndr TyVar VisibilityFlag
        This /always/ has a TyVar it.  In many places that's just what
        what we want, so there are /lots/ of TyBinder -> TyVarBinder changes
      
      * TyBinder still exists:
          data TyBinder = Named TyVarBinder | Anon Type
      
      * data Type = ForAllTy TyVarBinder Type
                  | FunTy Type Type
                  |  ....
      
      There are a LOT of knock-on changes, but they are all routine.
      
      The Haddock submodule needs to be updated too
      77bb0927
  24. Jun 14, 2016
Loading