summaryrefslogtreecommitdiff
path: root/utils
Commit message (Collapse)AuthorAgeFilesLines
* Implement deriving strategiesRyan Scott2016-08-271-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Allows users to explicitly request which approach to `deriving` to use via keywords, e.g., ``` newtype Foo = Foo Bar deriving Eq deriving builtin Ord deriving newtype Show ``` Fixes #10598. Test Plan: ./validate Reviewers: hvr, kosmikus, goldfire, bgamari, simonpj, alanz, austin, erikd, simonmar Reviewed By: simonpj, alanz Subscribers: thomie, mpickering, oerjan Differential Revision: https://phabricator.haskell.org/D2280 GHC Trac Issues: #10598
* 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.
* Update hsc2hs submoduleHerbert Valerio Riedel2016-04-191-0/+0
| | | | This bumps the hsc2hs version to 0.68
* Add flag to control number of missing patterns in warningsDavid Luposchainsky2016-04-171-0/+6
| | | | | | | | | | | | | | | | | | Non-exhaustive pattern warnings had their number of patterns to show hardcoded in the past. This patch implements the TODO remark that this should be made a command line flag. -fmax-uncovered-patterns=<n> can now be used to influence the number of patterns to be shown. Reviewers: hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2076
* Bump haddock submoduleBen Gamari2016-04-161-0/+0
|
* deriveConstants: Verify sanity of nmHerbert Valerio Riedel2016-04-161-2/+14
| | | | | | | | | | | | | Add a sanity check ensuring that nm emits valid hexadecimal output, as required by POSIX. See #11744 for motivation. Reviewers: austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2113 GHC Trac Issues: #11744
* Bump haddock submoduleBen Gamari2016-04-101-0/+0
| | | | | Fixes #11818, where haddock's documentation broke `make install` when Sphinx is not available.
* Improve printing of pattern synonym typesRik Steenkamp2016-04-021-0/+0
| | | | | | | | | | | | | | | | | | | | | Add the function `pprPatSynType :: PatSyn -> SDoc` for printing pattern synonym types, and remove the ambiguous `patSynType` function. Also, the types in a `PatSyn` are now tidy. Haddock submodule updated to reflect the removal of `patSynType` by mpickering. Fixes: #11213. Reviewers: goldfire, simonpj, austin, mpickering, bgamari Reviewed By: simonpj, mpickering Subscribers: bollmann, simonpj, thomie Differential Revision: https://phabricator.haskell.org/D1896 GHC Trac Issues: #11213
* Add option `no-keep-hi-files` and `no-keep-o-files` (fixes #4114)Kai Harries2016-03-241-0/+12
| | | | | | | | | | | | | | | | | Summary: Remove `.hi` and `.o` files if the flags `no-keep-hi-files` and `no-keep-o-files` are given. Test Plan: ./validate Reviewers: austin, thomie, bgamari Reviewed By: thomie, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2021 GHC Trac Issues: #4114
* users-guide: Add -Wredundant-constraints to flags referenceBen Gamari2016-03-241-0/+7
| | | | | | | | | | | | Test Plan: Validate and read Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2035 GHC Trac Issues: #11741
* Default RuntimeRep variables unless -fprint-explicit-runtime-repsBen Gamari2016-03-241-0/+7
| | | | | | | | | | | | | | | | | | | | Summary: Addresses #11549 by defaulting `RuntimeRep` variables to `PtrRepLifted` and adding a new compiler flag `-fprint-explicit-runtime-reps` to disable this behavior. This is just a guess at the right way to go about this. If it's wrong-beyond-any-hope just say so. Test Plan: Working on a testcase Reviewers: goldfire, austin Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D1961 GHC Trac Issues: #11549
* Fix #11648.Richard Eisenberg2016-03-141-0/+0
| | | | | | | | | | | | We now check that a CUSK is really a CUSK and issue an error if it isn't. This also involves more solving and zonking in kcHsTyVarBndrs, which was the outright bug reported in #11648. Test cases: polykinds/T11648{,b} This updates the haddock submodule. [skip ci]
* Add -foptimal-applicative-doSimon Marlow2016-03-111-0/+6
| | | | | | | | | | | | | | | | | | | | Summary: The algorithm for ApplicativeDo rearrangement is based on a heuristic that runs in O(n^2). This patch adds the optimal algorithm, which is O(n^3), selected by a flag (-foptimal-applicative-do). It finds better solutions in a small number of cases (about 2% of the cases where ApplicativeDo makes a difference), but it can be very slow for large do expressions. I'm mainly adding it for experimental reasons. ToDo: user guide docs Test Plan: validate Reviewers: simonpj, bgamari, austin, niteria, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1969
* Update Cabal submodule to latest HEAD snapshotHerbert Valerio Riedel2016-03-094-4/+4
|