summaryrefslogtreecommitdiff
path: root/utils
Commit message (Collapse)AuthorAgeFilesLines
* genapply: update source file in autogenerated textSergei Trofimovich2016-10-041-1/+1
| | | | Signed-off-by: Sergei Trofimovich <siarheit@google.com>
* runghc: Fix import of System.Process on WindowsBen Gamari2016-10-021-1/+1
| | | | | | | | | | | | | | | | | This apparently should have been an import of rawSystem instead of runProcess. Oops. Fixes D2538. Test Plan: Validate on Linux and Windows. Reviewers: austin, snowleopard Reviewed By: snowleopard Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2561
* Update Cabal submodule to latest version.Edward Z. Yang2016-10-022-28/+32
| | | | | | | | | | | | | | | | | | | | | | | Summary: Note that Cabal needs one more bugfix which is in PR to fix GHC bootstrapping. But the rest of the patch is ready for review. Needs a filepath submodule update because cabal check became more strict. This patch handles the abstract-ification of Version and PackageName. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2555
* runghc: use executeFile to run ghc process on POSIXMichael Snoyman2016-10-022-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | This means that, on POSIX systems, there will be only one ghc process used for running scripts, as opposed to the current situation of a runghc process and a ghc process. Beyond minor performance benefits of not having an extra fork and resident process, the more important impact of this is automatically getting proper signal handling. I noticed this problem myself when running runghc as PID1 inside a Docker container. I attempted to create a shim library for executeFile that would work for both POSIX and Windows, but unfortunately I ran into issues with exit codes being propagated correctly (see https://github.com/fpco/replace-process/issues/2). Therefore, this patch leaves the Windows behavior unchanged. Given that signals are a POSIX issue, this isn't too bad a trade-off. If someone has suggestions for better Windows _exec support, please let me know. Reviewers: erikd, austin, bgamari Reviewed By: bgamari Subscribers: Phyx, thomie Differential Revision: https://phabricator.haskell.org/D2538
* ghc-pkg: Allow unregistering multiple packages in one callNiklas Hambüchen2016-10-011-5/+6
| | | | | | | | | | | | Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2550 GHC Trac Issues: #12637
* Implement deriving strategiesRyan Scott2016-09-302-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Allows users to explicitly request which approach to `deriving` to use via keywords, e.g., ``` newtype Foo = Foo Bar deriving Eq deriving stock Ord deriving newtype Show ``` Fixes #10598. Updates haddock submodule. Test Plan: ./validate Reviewers: hvr, kosmikus, goldfire, alanz, bgamari, simonpj, austin, erikd, simonmar Reviewed By: alanz, bgamari, simonpj Subscribers: thomie, mpickering, oerjan Differential Revision: https://phabricator.haskell.org/D2280 GHC Trac Issues: #10598
* Bump Haddock submodule to fix rendering of class methodsMatthew Pickering2016-09-201-0/+0
| | | | Fixes #12519
* Remove references to -XRelaxedPolyRecBen Gamari2016-09-081-8/+0
| | | | | | | | | | | | Test Plan: Read it Reviewers: dfeuer, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2515 GHC Trac Issues: #11691
* ghc-cabal: accept EXTRA_HC_OPTS make variableSergei Trofimovich2016-09-021-1/+2
| | | | Signed-off-by: Sergei Trofimovich <siarheit@google.com>
* Add -fdefer-out-of-scope-variables flag (#12170).Eugene Akentyev2016-08-311-1/+19
| | | | | | | | | | | | Reviewers: simonpj, thomie, austin, bgamari Reviewed By: simonpj, thomie, bgamari Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D2458 GHC Trac Issues: #12170
* Add -flocal-ghci-history flag (#9089).Eugene Akentyev2016-08-311-0/+7
| | | | | | | | | | | | Reviewers: thomie, bgamari, austin Reviewed By: thomie, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2461 GHC Trac Issues: #9089
* Fixes #12504: Double-escape paths used to build call to hsc_lineRichard Cook2016-08-311-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | In outHsLine, paths passed to construct invocations of hsc_line must be escaped twice in order to generate a properly escaped string literal that will end up in the eventual LINE pragma emitted by this code. This is especially important on Windows paths, where backslashes would otherwise be treated as C escape sequences and result in the incorrect Windows paths. Adds test case to verify that hsc2hs properly escapes file paths in LINE pragmas Updates the hsc2hs submodule. See https://ghc.haskell.org/trac/ghc/ticket/12504 Reviewers: erikd, hvr, austin, bgamari, Phyx Reviewed By: erikd, Phyx Subscribers: thomie, Phyx, mpickering Differential Revision: https://phabricator.haskell.org/D2478 GHC Trac Issues: #12504
* Fix and complete runghc documentationHarendra Kumar2016-08-301-0/+1
| | | | | | | | | | Reviewers: austin, thomie, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D2463 GHC Trac Issues: #12517
* Cabal submodule update.Edward Z. Yang2016-08-083-20/+23
| | | | | | | | | | | | | | | | | There's a substantial bump to the haddock.Cabal allocation stats, because we added 50% more modules, so of course allocations are going to increase 50%. (But perhaps this is indicative of some bad constant factor in Haddock related to modules.) Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: ggreif, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2442
* Remove identity update of field componentsConfigsGabor Greif2016-08-051-6/+1
| | | | | | | ... in LocalBuildInfo, getting rid of a TODO in the process. Turns out that componentsConfigs won't be a field in Cabal 2.0 any more, so this can be seen as a preparation for it.
* Trim all spaces after 'version:'Gabor Greif2016-08-051-1/+1
| | | | | | | ... that we grep out of libraries/Cabal/Cabal/Cabal.cabal This is necessary because the file got reformatted in the 'master' branch.
* Add deepseq dependency and a few NFData instancesSimon Marlow2016-07-221-0/+0
| | | | | | | | | | | | | | | | | | | | I needed to rnf a data structure (CompiledByteCode) but we don't have any good deepseq infrastructure in the compiler yet. There are bits and pieces, but nothing consistent, so this is a start. We already had a dependency on deepseq indirectly via other packages (e.g. containers). Includes an update to the haddock submodule, to remove orphan NFData instances in there. Test Plan: validate Reviewers: austin, bgamari, erikd, hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2418
* Bump Haddock submoduleÖmer Sinan Ağacan2016-07-211-0/+0
|
* Implement unboxed sum primitive typeÖmer Sinan Ağacan2016-07-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Compact RegionsGiovanni Campagna2016-07-202-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | This brings in initial support for compact regions, as described in the ICFP 2015 paper "Efficient Communication and Collection with Compact Normal Forms" (Edward Z. Yang et.al.) and implemented by Giovanni Campagna. Some things may change before the 8.2 release, but I (Simon M.) wanted to get the main patch committed so that we can iterate. What documentation there is is in the Data.Compact module in the new compact package. We'll need to extend and polish the documentation before the release. Test Plan: validate (new test cases included) Reviewers: ezyang, simonmar, hvr, bgamari, austin Subscribers: vikraman, Yuras, RyanGlScott, qnikst, mboes, facundominguez, rrnewton, thomie, erikd Differential Revision: https://phabricator.haskell.org/D1264 GHC Trac Issues: #11493
* hp2ps: fix invalid PostScript for names with parenthesesBen Gamari2016-07-171-1/+2
| | | | | | | | | | | | | | | | | The names in the .hp files may contain un-matched opening parentheses, so escape them. GHC Trac: #9517 Reviewers: bgamari, austin Reviewed By: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2398 GHC Trac Issues: #9517
* CodeGen: Way to dump cmm only once (#11717)Vladimir Trubilov2016-07-171-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add -package-env to the flags referenceSimon Marlow2016-07-111-7/+11
|
* check-api-annotations utility loads by filenameAlan Zimmerman2016-07-101-3/+11
| | | | | Previously it loaded by modulename, which prevented loading files with a Main module.
* Allow one type signature for multiple pattern synonymsMatthew Pickering2016-07-011-0/+0
| | | | | | | | | This makes pattern synonym signatures more consistent with normal type signatures. Updates haddock submodule. Differential Revision: https://phabricator.haskell.org/D2083
* Fix check_uniques in non-unicode localeThomas Miedema2016-06-301-1/+2
| | | | | | | | | Testcase: `LC_ALL=C make -C utils/checkUniques`. Works with python2 and python3. Reviewed by: bgamari Differential Revision: https://phabricator.haskell.org/D2372
* ghc-pkg: Drop trailing slashes in computing db pathsBen Gamari2016-06-301-1/+1
| | | | | | | | | | | | Test Plan: Validate, try tests in ticket Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2336 GHC Trac Issues: #12194
* Updates to handle new CabalEdward Z. Yang2016-06-303-18/+18
| | | | | | | | | | | | | | | | | | Specifically per-component macros and multiple libraries. Contains Cabal submodule update. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: austin, bgamari Reviewed By: austin, bgamari Subscribers: hvr, thomie Differential Revision: https://phabricator.haskell.org/D2059
* Re-add FunTy (big patch)Simon Peyton Jones2016-06-151-0/+0
| | | | | | | | | | | | | | | | | | | | | | 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
* Update Haddock to follow change in LHsSigWcTypeSimon Peyton Jones2016-06-131-0/+0
| | | | | | | | | | | | Update submodule to accompany this commit: commit 15b9bf4ba4ab47e6809bf2b3b36ec16e502aea72 Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Sat Jun 11 23:49:27 2016 +0100 Improve typechecking of let-bindings Sorry it's late!
* Docs: delete PatternGuards documentationThomas Miedema2016-06-091-6/+8
| | | | | | | | | | | | | | | | | | Since `-XPatternGuards` is enabled by default, invert the logic and mention `-XNoPatternGuards` first. Also, since this is a Haskell 2010 feature, refer to the language report instead of explaining it. In general, I would like to follow the guideline of assuming the latest language report as a given, and then only report GHC's deviations and extensions relative to that report. Reviewed by: bgamari Differential Revision: https://phabricator.haskell.org/D2319 GHC Trac Issues: #12172
* Docs: fix links to ghc-flagsThomas Miedema2016-06-098-82/+82
|
* Remove special casing of Windows in generic filesTamar Christina2016-06-091-0/+5
| | | | | | | | | | | | | | | | | | Summary: Remove some Windows specific code from the .m4 files and have configure figure it out. Unfortunately touchy can't be removed since there is no mingw build of coreutils. Only msys builds which would give us a dependency on the msys runtime. Reviewers: hvr, austin, thomie, bgamari Reviewed By: thomie, bgamari Subscribers: thomie, erikd, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2248
* Merge MatchFixity and HsMatchContextAlan Zimmerman2016-06-061-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: MatchFixity was introduced to facilitate use of API Annotations. HsMatchContext does the same thing with more detail, but is chased through all over the place to provide context when processing a Match. Since we already have MatchFixity in the Match, it may as well provide the full context. updates submodule haddock Test Plan: ./validate Reviewers: austin, goldfire, bgamari Subscribers: thomie, mpickering Differential Revision: https://phabricator.haskell.org/D2271 GHC Trac Issues: #12105 (cherry picked from commit 306ecad591951521ac3f5888ca8be85bf749d271)
* Add -XStaticPointers to the flag reference.Facundo Domínguez2016-05-191-0/+7
|
* rts: Add isPinnedByteArray# primopBen Gamari2016-05-181-0/+1
| | | | | | | | | | | | | | | | | Adds a primitive operation to determine whether a particular `MutableByteArray#` is backed by a pinned buffer. Test Plan: Validate with included testcase Reviewers: austin, simonmar Reviewed By: austin, simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2217 GHC Trac Issues: #12059
* Fix histograms for ticky codeMateusz Lenik2016-05-181-0/+3
| | | | | | | | | | | | | | | | | | | | This patch fixes Cmm generation required to produce histograms when compiling with -ticky flag, strips dead code from rts/Ticky.c and reworks it to use a shared constant in both C and Haskell code. Fixes #8308. Test Plan: T8308 Reviewers: jstolarek, simonpj, austin Reviewed By: simonpj Subscribers: mpickering, simonpj, bgamari, mlen, thomie, jstolarek Differential Revision: https://phabricator.haskell.org/D931 GHC Trac Issues: #8308
* Remove html_theme requirement of haddock docsBen Gamari2016-05-161-0/+0
| | | | Updates haddock submodule.
* Another bump of haddock submoduleBen Gamari2016-05-161-0/+0
| | | | | | Trying to ensure consistent haddock documentation across Sphinx versions is far too much work for too little benefit; reverting Alabaster vendorization.
* Bump haddock submoduleBen Gamari2016-05-161-0/+0
| | | | Vendorise alabaster theme for older sphinx releases.
* Bump haddock submoduleBen Gamari2016-05-141-0/+0
| | | | | This includes various fixes to Haddock's integration with the GHC build system.
* Allow putting Haddocks on derived instancesRyan Scott2016-05-121-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | Currently, one can document top-level instance declarations, but derived instances (both those in `deriving` clauses and standalone `deriving` instances) do not enjoy the same privilege. This makes the necessary changes to the parser to enable attaching Haddock comments for derived instances. Updates haddock submodule. Fixes #11768. Test Plan: ./validate Reviewers: hvr, bgamari, austin Reviewed By: austin Subscribers: thomie, mpickering Differential Revision: https://phabricator.haskell.org/D2175 GHC Trac Issues: #11768
* Bump haddock submoduleBen Gamari2016-05-121-0/+0
|
* deriveConstants: Fix nm advice one last timeBen Gamari2016-05-011-1/+1
| | | | Missing a close paren.
* Bump haddock submoduleBen Gamari2016-05-011-0/+0
| | | | Fixes documentation installation.
* Recommend more reliable recourse for broken nmBen Gamari2016-04-281-1/+1
| | | | | xcrun --find seems like the appropriate choice here. Thanks to Brandon Allbery for suggesting this.
* Document -fmax-pmcheck-iterations a bit betterBen Gamari2016-04-281-0/+5
|
* deriveConstants: Fix nm-classic error messageBen Gamari2016-04-241-1/+4
| | | | Thanks to George Colpitts for the suggestion.
* SCC analysis for instances as well as types/classesSimon Peyton Jones2016-04-202-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This big patch is in pursuit of Trac #11348. It is largely the work of Alex Veith (thank you!), with some follow-up simplification and refactoring from Simon PJ. The main payload is described in RnSource Note [Dependency analysis of type, class, and instance decls] which is pretty detailed. * There is a new data type HsDecls.TyClGroup, for a strongly connected component of type/class/instance/role decls. The hs_instds field of HsGroup disappears, in consequence This forces some knock-on changes, including a minor haddock submodule update Smaller, weakly-related things * I found that both the renamer and typechecker were building an identical env for RoleAnnots, so I put common code for RoleAnnotEnv in RnEnv. * I found that tcInstDecls1 had very clumsy error handling, so I put it together into TcInstDcls.doClsInstErrorChecks
* Bump haddock submoduleBen Gamari2016-04-201-0/+0
| | | | Install files necessary for --hyperlinked-source. Fixes #11949.