summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix #11015 with a nice note.Edward Z. Yang2016-01-141-0/+70
| | | | | | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: doc only Reviewers: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1776 GHC Trac Issues: #11015
* Remove lookup of sections by name instead use the index numbers as offsetsTamar Christina2016-01-141-63/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch comes from @awson {{{ Playing with `-fsplit-sections` on Windows I've found a pile of ancient (it was borrowed from Hugs interpreter code and I don't even know when was it created), absolutely redundant and plain wrong code in RTS linker. Technically it is a bug, but it doesn't break things when used with current Windows binutils with no special linker scripts involved. OTOH, it slows down runtime linker on Windows noticeably and thus can be considered as a performance bug. The nice side-effect for existing users is that GHCi now loads compiled object code much faster on Windows. }}} More specifically, sections were being looked up by name by doing a loop over all sections until the section with the given name is found. The new approach uses the section index and finds the section in O(1) time based on information gathered when we originally processed the section Test Plan: ./validate (was run on GHC x86) Reviewers: austin, awson, erikd, thomie, bgamari Reviewed By: thomie, bgamari Subscribers: awson, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D1773 GHC Trac Issues: #11388
* T11300: Fix test on windowsTamar Christina2016-01-142-7/+7
| | | | | | | | | | | | | | Summary: Fix exit code for Windows to match expected for out-of-memory test Test Plan: ./validate Reviewers: simonmar, austin, thomie, bgamari Reviewed By: thomie, bgamari Differential Revision: https://phabricator.haskell.org/D1753 GHC Trac Issues: #11422
* API Annotations: use AnnValue for (~)Alan Zimmerman2016-01-141-1/+1
| | | | | | | | | Previously oqtycon used AnnTilde for the location of the RdrName when parsing (~). The recent increase in '~' characters in the AST confuses ghc-exactprint, so this patch treats all RdrNames the same way now, marking the location of the core name with AnnValue.
* user-guide: Use ghc-flag for dump formatting flagsBen Gamari2016-01-141-13/+9
| | | | And document -dth-dec-file. Not sure how these were missed.
* users-guide: Add since annotations for language extensionsBen Gamari2016-01-142-0/+66
| | | | | Based off of https://ghc.haskell.org/trac/ghc/wiki/LanguagePragmaHistory.
* users-guide: Update language extension implicationsBen Gamari2016-01-141-5/+24
|
* Rename InjectiveTypeFamilies to TypeFamilyDependenciesBen Gamari2016-01-1422-27/+28
|
* INSTALL.md: Mention -j and other wibblesBen Gamari2016-01-141-3/+6
|
* Add tests for #11391Ben Gamari2016-01-145-0/+40
|
* GHC.Generics: Fix documentationBen Gamari2016-01-141-1/+1
| | | | Fixes #11417.
* users-guide: WibblesBen Gamari2016-01-142-2/+2
|
* Minor code refactoringJan Stolarek2016-01-141-5/+4
| | | | This moves let-bindings right next to their use site.
* Minor improvement in CoreDump outputs:Ömer Sinan Ağacan2016-01-131-3/+10
| | | | | | | | | | | | Don't add parens unnecessarily when arguments of the application are all hidden (because of parameters like -dsuppress-all, -dsuppress-type-applications etc.) Reviewers: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1771
* Handle over-applied custom type errors too.Iavor S. Diatchki2016-01-132-4/+7
| | | | | | | | | | Consider type family F :: Type -> Type where F = TypeError (Text "Error") Now, if we see something like `F Int` we should still report the custom type error.
* Print a message when loading a .ghci file.Kwang Yul Seo2016-01-132-2/+6
| | | | | | | | | | | | | | Test Plan: ./validate Reviewers: austin, thomie, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D1756 GHC Trac Issues: #11389
* Add test for Data.Typeable.typeOfBen Gamari2016-01-133-0/+58
| | | | | | | | | | | | Test Plan: Validate Reviewers: goldfire, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1770 GHC Trac Issues: #11120
* Add missing type representationsBen Gamari2016-01-135-33/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we were missing `Typeable` representations for several wired-in types (and their promoted constructors). These include, * `Nat` * `Symbol` * `':` * `'[]` Moreover, some constructors were incorrectly identified as being defined in `GHC.Types` whereas they were in fact defined in `GHC.Prim`. Ultimately this is just a temporary band-aid as there is general agreement that we should eliminate the manual definition of these representations entirely. Test Plan: Validate Reviewers: austin, hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1769 GHC Trac Issues: #11120
* TemplateHaskell: revive isStrict, notStrict and unpackedThomas Miedema2016-01-132-0/+15
| | | | | | | | | | | | | These 3 functions are useful to keep around a bit longer, to prevent breaking existing code that uses them. Related to #10697. Reviewers: austin, goldfire, RyanGlScott, bgamari Reviewed By: RyanGlScott, bgamari Differential Revision: https://phabricator.haskell.org/D1761
* Use implicit CallStacks for ASSERT when availableBartosz Nitka2016-01-131-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This aids with debugging, since all you have to do to get more stack frames is add a constraint `(?callStack :: CallStack) =>`. Old output: ``` ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.1.20160107 for x86_64-unknown-linux): ASSERT failed! file compiler/types/TyCoRep.hs line 1800 InScope [] [Xuv :-> n_av5[sk]] [] ``` New output: ``` ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.1.20160107 for x86_64-unknown-linux): ASSERT failed! CallStack (from ImplicitParams): assertPprPanic, called at compiler/types/TyCoRep.hs:1800:95 in ghc:TyCoRep InScope [] [Xuv :-> n_av5[sk]] [] ``` Test Plan: harbormaster manual testing Reviewers: austin, gridaphobe, bgamari Reviewed By: gridaphobe, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1751
* A little closer to supporting breakpoints with -fexternal-interpreterSimon Marlow2016-01-134-77/+94
| | | | | | | | | | | | | | Summary: Moves getIdValFromApStack to the server, and removes one use of wormhole. Test Plan: validate Reviewers: bgamari, niteria, austin, hvr, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1768 GHC Trac Issues: #11100
* Add -prof stack trace to assertSimon Marlow2016-01-133-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: So that assertion failures have full call stack information attached when using `ghc -fexternal-interpreter -prof`. Here's one I just collected by inserting a dummy assert in Happy: ``` *** Exception: Assertion failed CallStack (from ImplicitParams): assert, called at ./First.lhs:37:11 in main:First CallStack (from -prof): First.mkFirst (First.lhs:37:11-27) First.mkFirst (First.lhs:37:11-93) Main.main2.runParserGen.first (Main.lhs:107:48-56) Main.main2.runParserGen.first (Main.lhs:107:27-57) Main.main2.runParserGen (Main.lhs:(96,9)-(276,9)) Main.main2.runParserGen (Main.lhs:(90,9)-(276,10)) Main.main2.runParserGen (Main.lhs:(86,9)-(276,10)) Main.main2.runParserGen (Main.lhs:(85,9)-(276,10)) Main.main2 (Main.lhs:74:20-43) Main.main2 (Main.lhs:(64,9)-(78,61)) Main.main (Main.lhs:57:9-18) ``` Test Plan: validate Reviewers: erikd, hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1765 GHC Trac Issues: #11047
* fix typo causing compilation failure on SPARC (ArchSparc -> ArchSPARC)Karel Gardas2016-01-121-1/+1
|
* Linker: Define ELF_64BIT for aarch64_HOST_ARCHErik de Castro Lopo2016-01-111-0/+2
| | | | | | | | | | | | Test Plan: Build on x86_64 and AArch64 Reviewers: hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1759
* ghc.mk: Use Windows_Target instead of Windows_HostErik de Castro Lopo2016-01-101-2/+2
| | | | | | | | | | | | | | This is a step towards building a Linux to Windows cross-compiler. Test Plan: Build on Linux and Windows Reviewers: bgamari, hvr, austin, Phyx Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1758 GHC Trac Issues: #10070
* TrieMap: Minor documentation fixÖmer Sinan Ağacan2016-01-091-2/+9
|
* Add InjectiveTypeFamilies language extensionJan Stolarek2016-01-0924-20/+54
| | | | | | | | | | | | | | | | | Previously injective type families were part of TypeFamilies. Now they are in a separate language extension. Test Plan: ./validate Reviewers: austin, bgamari, goldfire Reviewed By: bgamari Subscribers: goldfire, thomie Differential Revision: https://phabricator.haskell.org/D1750 GHC Trac Issues: #11381
* fix -ddump-splices to parenthesize ((\x -> x) a) correctlyYuri de Wit2016-01-093-7/+7
| | | | | | | | | | | | Test Plan: ./validate Reviewers: goldfire, austin, bgamari Subscribers: goldfire, osa1, thomie Differential Revision: https://phabricator.haskell.org/D1114 GHC Trac Issues: #10603
* Add failing testcase for #10603Ben Gamari2016-01-093-0/+12
|
* Parser: delete rule numbers + validate shift/reduce conlictsThomas Miedema2016-01-091-50/+49
| | | | | | | | | | | Rule numbers tend to go out-of-date, and aren't useful. And during validate, the actual number of shift/reduce conflicts is now checked against the number stated in Parser.y. Reviewed by: bgamari Differential Revision: https://phabricator.haskell.org/D1754
* Reject import declaration with semicolon in GHCiRik Steenkamp2016-01-096-10/+29
| | | | | | | | | | | | | | | | | | | | | | | | Now GHCi rejects input containing an import declaration and semicolon, and prints an appropriate error message. Before, the stuff after an import declaration and semicolon got ignored (most of the time), without telling the user about it. As the default behaviour of GHCi is to reject multiple commands in a single input, we extend this behaviour to import commands. This patch fixes #10663. (See https://phabricator.haskell.org/D1518 for the introduction of `is_import` and `is_decl`.) Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1726 GHC Trac Issues: #10663
* user-guide/safe_haskell: Fix typosBen Gamari2016-01-091-4/+4
|
* user-guide: More semantic markupBen Gamari2016-01-091-63/+70
|
* docs: Fix DeriveAnyClass reference in release notes and ANNOUNCEBen Gamari2016-01-092-2/+3
|
* users-guide: A few fixesBen Gamari2016-01-092-1/+11
|
* users_guide: Use semantic directive/role for command line optionsBen Gamari2016-01-0922-4111/+3178
| | | | | | And GHCi commands. This makes cross-referencing much easier. Also normalize markup a bit and add some missing flags.
* Fix test for T9367 (Windows)Rik Steenkamp2016-01-081-1/+1
| | | | | | | | See c8c44fd91b509b9eb644c826497ed5268e89363a. Reviewed By: thomie, bgamari Differential Revision: https://phabricator.haskell.org/D1745
* Build system: fix `pwd` issues on WindowsThomas Miedema2016-01-083-5/+15
| | | | | | | | | | | | | Some parts of the build system require that paths are what msys2 calls "mixed style": * forwards slashes * absolute paths starting with a drive letter followed by a colon (e.g. "C:") The removal of ghc-pwd in 4c56ad3 changed $(TOP) from mixed style to unix style, resulting in a broken Windows build for some. Differential Revision: https://phabricator.haskell.org/D1752
* Docs for stack traces in GHCiSimon Marlow2016-01-082-6/+58
|
* Add a pointer to the relevant paper for InScopeSetBartosz Nitka2016-01-081-0/+2
| | | | | | | | | | | | | | | This was non-obvious to me when reading the sources and the paper provides the motivation and explores the design space. Test Plan: just a comment Reviewers: simonpj, austin, ezyang, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1749
* Rename the test-way prof_h to normal_hSimon Marlow2016-01-082-4/+4
|
* Fix +RTS -h when compiling without -profSimon Marlow2016-01-084-10/+21
| | | | | | | | | | | | | | | | Summary: Was broken by ce1f1607ed7f8fedd2f63c8610cafefd59baaf32. I've added a test so that hopefully it won't break again. Test Plan: validate & new test case Reviewers: bgamari, austin, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1746 GHC Trac Issues: #11304
* Improve GHC.Event.IntTable performanceJonas Scholl2016-01-081-16/+15
| | | | | | | | | | | | | | | | | | | | | | Speed up GHC.Event.IntTable.lookup by removing the IO context from the go helper function. This generates a little bit better code as we can avoid repeating the stack check. Remove unused parameter from GHC.Event.IntTable.updateWith.go and directly return a bool instead of a maybe and then checking that whether it is a Nothing. Test Plan: validate Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1742 GHC Trac Issues: #8793
* Fix Template Haskell's handling of infix GADT constructorsRyanGlScott2016-01-0810-33/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the second (and hopefully last) fix needed to make TH handle GADTs properly (after D1465). This Diff addresses some issues with infix GADT constructors, specifically: * Before, you could not determine if a GADT constructor was declared infix because TH did not give you the ability to determine if there is a //user-specified// fixity declaration for that constructor. The return type of `reifyFixity` was changed to `Maybe Fixity` so that it yields `Just` the fixity is there is a fixity declaration, and `Nothing` otherwise (indicating it has `defaultFixity`). * `DsMeta`/`Convert` were changed so that infix GADT constructors are turned into `GadtC`, not `InfixC` (which should be reserved for Haskell98 datatype declarations). * Some minor fixes to the TH pretty-printer so that infix GADT constructors will be parenthesized in GADT signatures. Fixes #11345. Test Plan: ./validate Reviewers: goldfire, austin, bgamari, jstolarek Reviewed By: jstolarek Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1744 GHC Trac Issues: #11345
* User's Guide: injective type families sectionJan Stolarek2016-01-081-1/+19
|
* Support for qRecover in TH with -fexternal-interpreterSimon Marlow2016-01-085-33/+92
| | | | | | | | | | | | | | Summary: This completes the support for TH with -fexternal-interpreter. Test Plan: validate Reviewers: bgamari, ezyang, austin, niteria, goldfire, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1748 GHC Trac Issues: #11100
* Enable stack traces with ghci -fexternal-interpreter -profSimon Marlow2016-01-0839-584/+680
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The main goal here is enable stack traces in GHCi. After this change, if you start GHCi like this: ghci -fexternal-interpreter -prof (which requires packages to be built for profiling, but not GHC itself) then the interpreter manages cost-centre stacks during execution and can produce a stack trace on request. Call locations are available for all interpreted code, and any compiled code that was built with the `-fprof-auto` familiy of flags. There are a couple of ways to get a stack trace: * `error`/`undefined` automatically get one attached * `Debug.Trace.traceStack` can be used anywhere, and prints the current stack Because the interpreter is running in a separate process, only the interpreted code is running in profiled mode and the compiler itself isn't slowed down by profiling. The GHCi debugger still doesn't work with -fexternal-interpreter, although this patch gets it a step closer. Most of the functionality of breakpoints is implemented, but the runtime value introspection is still not supported. Along the way I also did some refactoring and added type arguments to the various remote pointer types in `GHCi.RemotePtr`, so there's better type safety and documentation in the bridge code between GHC and ghc-iserv. Test Plan: validate Reviewers: bgamari, ezyang, austin, hvr, goldfire, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1747 GHC Trac Issues: #11047, #11100
* Typos in docs and commentsGabor Greif2016-01-0710-15/+15
|
* Test Trac #10625Simon Peyton Jones2016-01-072-0/+7
|
* Make demand analysis understand catchSimon Peyton Jones2016-01-0715-428/+550
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As Trac #11222, and #10712 note, the strictness analyser needs to be rather careful about exceptions. Previously it treated them as identical to divergence, but that won't quite do. See Note [Exceptions and strictness] in Demand, which explains the deal. Getting more strictness in 'catch' and friends is a very good thing. Here is the nofib summary, keeping only the big ones. -------------------------------------------------------------------------------- Program Size Allocs Runtime Elapsed TotalMem -------------------------------------------------------------------------------- fasta -0.1% -6.9% -3.0% -3.0% +0.0% hpg -0.1% -2.0% -6.2% -6.2% +0.0% maillist -0.1% -0.3% 0.08 0.09 +1.2% reverse-complem -0.1% -10.9% -6.0% -5.9% +0.0% sphere -0.1% -4.3% 0.08 0.08 +0.0% x2n1 -0.1% -0.0% 0.00 0.00 +0.0% -------------------------------------------------------------------------------- Min -0.2% -10.9% -17.4% -17.3% +0.0% Max -0.0% +0.0% +4.3% +4.4% +1.2% Geometric Mean -0.1% -0.3% -2.9% -3.0% +0.0% On the way I did quite a bit of refactoring in Demand.hs