- Mar 19, 2015
-
-
This avoids the annoying conundrum explained in #9956 - for the 7.10 release, we'll keep (silently) supporting this flag so -Werror doesn't trip anything up. Really, we could just say 'deal with it' to users probably, but the fix is painless and does remove a sharp corner. Signed-off-by:
Austin Seipp <austin@well-typed.com> Reviewers: ezyang Differential Revision: https://phabricator.haskell.org/D742 GHC Trac Issues: #9956
-
- Mar 17, 2015
-
-
Parsing of static and mode flags happens before any session is started, i.e., before the first call to 'GHC.withGhc'. Therefore, to report errors for invalid usage of these two types of flags, we can not call any function that needs DynFlags, as there are no DynFlags available yet (unsafeGlobalDynFlags is not set either). So we always print "on the commandline" as the location, which is true except for Api users, which is probably ok. When reporting errors for invalid usage of dynamic flags we /can/ make use of DynFlags, and we do so explicitly in DynFlags.parseDynamicFlagsFull. Before, we called unsafeGlobalDynFlags when an invalid (combination of) flag(s) was given on the commandline, resulting in panics (#9963). This regression was introduced in 1d6124de. Also rename showSDocSimple to showSDocUnsafe, to hopefully prevent this from happening again. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D730 GHC Trac Issues: #9963 (cherry picked from commit 5166ee94)
-
- Mar 14, 2015
-
-
Some ELF link editors default to `--as-needed` and record only those libraries in DT_NEEDED tags that are needed to resolve undefined symbols in the shared object to be created. In Template Haskell we rely on all symbols that were defined in modules compiled so far to be available in the current temporary shared object. To prevent the link editor from dropping the DT_NEEDED tag for the previously linked temporary shared object we need to override the link editors default and specify `--no-as-needed` on the command line. This is for GNU ld and GOLD ld. This addresses #10110 TODO: regression test (cherry picked from commit 1b7f5976)
-
- Mar 13, 2015
-
-
Iavor S. Diatchki authored
Summary: This implements the new `Typeable` solver: when GHC sees `Typeable` constraints it solves them on the spot. The current implementation creates `TyCon` representations on the spot. Pro: No overhead at all in code that does not use `Typeable` Cons: Code that uses `Typeable` may create multipe `TyCon` represntations. We have discussed an implementation where representations of `TyCons` are computed once, in the module, where a datatype is declared. This would lead to more code being generated: for a promotable datatype we need to generate `2 + number_of_data_cons` type-constructro representations, and we have to do that for all programs, even ones that do not intend to use typeable. I added code to emit warning whenevar `deriving Typeable` is encountered--- the idea being that this is not needed anymore, and shold be fixed. Also, we allow `instance Typeable T` in .hs-boot files, but they result in a warning, and are ignored. This last one was to avoid breaking exisitng code, and should become an error, eventually. Test Plan: 1. GHC can compile itself. 2. I compiled a number of large libraries, including `lens`. - I had to make some small changes: `unordered-containers` uses internals of `TypeReps`, so I had to do a 1 line fix - `lens` needed one instance changed, due to a poly-kinded `Typeble` instance 3. I also run some code that uses `syb` to traverse a largish datastrucutre. I didn't notice any signifiant performance difference between the 7.8.3 version, and this implementation. Reviewers: simonpj, simonmar, austin, hvr Reviewed By: austin, hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D652 GHC Trac Issues: #9858 (cherry picked from commit b359c886)
-
- Mar 11, 2015
-
-
Herbert Valerio Riedel authored
This also needs to update a couple of other submodules to update the upper bound on filepath to allow this major version bump to 1.4.0.0 (cherry picked from commit 5f356f3e)
-
This changes the library file name format NOTE: This patch originally updated to Cabal HEAD, but was reduced to update to Cabal 1.22 HEAD by hvr as this is needed in order to update the filepath submodule to version 1.4.0, and subsequently to be cherry-picked into the ghc-7.10 branch Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> (cherry picked from commit 838d8044)
-
- Mar 10, 2015
-
-
Functions `readCreateProcess` and `readCreateProcessWithExitCode` were added to `System.Process`, the former of which conflicts with `SysTools.readCreateProcess`. (cherry picked from commit 8b7534b3)
-
- Mar 09, 2015
-
-
Summary: As a result of fixing #8935 we needed to open shared libraries with RTLD_LOCAL and so symbols from packages loaded earlier cannot be found anymore. We need to include in the link all packages loaded so far. This fixes #10058 Test Plan: validate Reviewers: hvr, simonmar, austin Reviewed By: austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D676 GHC Trac Issues: #10058 (cherry picked from commit 0fcc4543)
-
- Mar 07, 2015
-
-
Herbert Valerio Riedel authored
Whether to re-export the `<$>` non-method operator from `Prelude` wasn't explicitly covered in the original AMP proposal[1], but it turns out that not doing so forces most code that makes use of applicatives to import `Data.Functor` or `Control.Applicative` just to get that operator into scope. To this end, it was proposed to add `<$>` to Prelude as well[2]. The down-side is that this increases the amount of redundant-import warnings triggered, as well as the relatively minor issue of stealing the `<$>` operator from the default namespace for good (although at this point `<$>` is supposed to be ubiquitous anyway due to `Applicative` being implicitly required into the next Haskell Report) [1]: https://wiki.haskell.org/Functor-Applicative-Monad_Proposal [2]: http://thread.gmane.org/gmane.comp.lang.haskell.libraries/24161 (cherry picked from commit eb3661f2)
-
- Feb 23, 2015
-
-
Simon Peyton Jones authored
This fixes Trac #10072. Previously the type-hole constraint was escaping to top level, but it belongs in the scope of the skolems bound by the RULE. (cherry picked from commit 5ab7518f)
-
Summary: Remove unused variable that appeared through the fix for ticket #10078 Merge branch 'master' of git://git.haskell.org/ghc Added comment with bug ID. Reviewers: adamgundry, gridaphobe, austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D667 GHC Trac Issues: #10078 (cherry picked from commit fd581a73)
-
- Feb 12, 2015
-
-
Richard Eisenberg authored
This really should have done a while ago, with the ReturnTv factoring. It's surprising that I can't tickle the bug! Please merge to ghc-7.10. (cherry picked from commit 849e25ca)
-
- Feb 11, 2015
-
-
Richard Eisenberg authored
The old code used an unzonked type in an occurs-check, which would sometimes lead to an infinite loop. Please merge to ghc-7.10. (cherry picked from commit d5cd94d7)
-
Richard Eisenberg authored
Previously, try_decompose_nom_app was smart enough to recur if flattening exposed a TyConApp, but try_decompose_repr_app was not. Now, if neither type in try_decompose_repr_app is an AppTy, recur. Seems all straightforward enough to avoid a Note. (cherry picked from commit befe2d7c)
-
Simon Peyton Jones authored
The provoking cause was Trac #10019, but it revealed that nameIsLocalOrFrom should really include all interactive modules (ones from the 'interactive' package). Previously we had some ad-hoc 'isInteractiveModule' tests with some (but not all) the calls to nameIsLocalOrFrom. See the new comments with Name.nameIsLocalOrFrom. (cherry picked from commit 6ff3db92)
-
Summary: If the default filename of the output executable coincides with that of main source file, throw an error instead of silently clobbering the input file. Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D642 GHC Trac Issues: #9930 (cherry picked from commit 78833ca6)
-
Summary: We were erroneously discarding SCCs on function-typed variables. These can affect the call stack, so we have to retain them. The bug was introduced during the recent SourceNote refactoring. This is an alternative to the fix proposed in D616. I also added the scc005 test from that diff, which works with this change. While I was here, I also fixed up the other profiling tests, marking a few as expect_broken_for(10037) where the opt/unopt output differs in non-fatal ways. Test Plan: profiling tests Reviewers: scpmw, ezyang, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D636 GHC Trac Issues: #10007 (cherry picked from commit daed18c3)
-
- Feb 09, 2015
-
-
Simon Peyton Jones authored
(cherry picked from commit 43636e1b)
-
Simon Peyton Jones authored
It was already ok for methods. Fixes Trac #10020 (cherry picked from commit dda65282)
-
- Feb 05, 2015
-
-
Summary: When parsing a rhs, the GRHS is constructed via unguardedRHS which is given a SrcSpan which only takes account of the '=' and wherebinds, so does not include the exp when wherebinds are empty. Test Plan: ./validate Reviewers: hvr, austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D643 (cherry picked from commit d4f25cb1)
-
Summary: This is a first step for #9988 It turns out that bringing m_fun_id_infix through the renamer is actually very simple, affecting the internals of rnMatch' only. Is this simple enough to hit 7.10.1? Test Plan: ./validate Reviewers: hvr, simonpj, austin Reviewed By: simonpj, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D639 GHC Trac Issues: #9988 (cherry picked from commit c88e1121)
-
- Jan 28, 2015
-
-
Richard Eisenberg authored
Summary: The documentation (Note [The flattening story] in TcFlatten) was correct; it's just the implementation that was not. Test in typecheck/should_compile/T10031 Test Plan: validate Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D630 GHC Trac Issues: #10031 (cherry picked from commit cecf036f)
-
- Jan 23, 2015
-
-
Peter Wortmann authored
As with stripTicksTop, this is because we often need the stripped expression but not the ticks (at least not right away). This makes a big difference for CSE, see #9961. Signed-off-by:
Austin Seipp <austin@well-typed.com> (cherry picked from commit 55199a97)
-
Summary: Add a reference note to each AnnKeywordId haddock comment so GHC developers will have an idea why they are there. Add a new test to ghc-api/annotations to serve as a template for other GHC developers when they need to update the parser. It provides output which checks that each SrcSpan that an annotation is attached to actually appears in the `ParsedSource`, and lists the individual annotations. The idea is that a developer writes a version of this which parses a sample file using whatever syntax is changed in Parser.y, and can then check that all the annotations come through. Depends on D538 Test Plan: ./validate Reviewers: simonpj, hvr, austin Reviewed By: austin Subscribers: thomie, jstolarek Differential Revision: https://phabricator.haskell.org/D620 (cherry picked from commit 851ed721)
-
Summary: HsTyLit now has SourceText Update documentation of HsSyn to reflect which annotations are attached to which element. Ensure that the parser always keeps HsSCC and HsTickPragma values, to be ignored in the desugar phase if not needed Bringing in SourceText for pragmas Add Location in NPlusKPat Add Location in FunDep Make RecCon payload Located Explicitly add AnnVal to RdrName where it is compound Add Location in IPBind Add Location to name in IEThingAbs Add Maybe (Located id,Bool) to Match to track fun_id,infix This includes converting Match into a record and adding a note about why the fun_id needs to be replicated in the Match. Add Location in KindedTyVar Sort out semi-colons for parsing - import statements - stmts - decls - decls_cls - decls_inst This updates the haddock submodule. Test Plan: ./validate Reviewers: hvr, austin, goldfire, simonpj Reviewed By: simonpj Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D538 (cherry picked from commit 11881ec6)
-
Simon Peyton Jones authored
(cherry picked from commit 0afa37aa)
-
Simon Peyton Jones authored
In particular about the dcSrcBangs field of an imported DataCon (cherry picked from commit c506f254)
-
Simon Peyton Jones authored
This fixes Trac #9969, a new crash in T7562 that I somehow missed when fiddling with HsBang (cherry picked from commit 327ce1d3)
-
Simon Peyton Jones authored
Provoked by questions from Johan - Improve comments, fix misleading stuff - Add commented synonyms for HsSrcBang, HsImplBang, and use them throughout - Rename HsUserBang to HsSrcBang - Rename dataConStrictMarks to dataConSrcBangs dataConRepBangs to dataConImplBangs This renaming affects Haddock in a trivial way, hence submodule update (cherry picked from commit 9564bb8c)
-
Edward Z. Yang authored
Summary: Previously, we would consider ALL versions of a wired-in package, no matter if they were exposed or not, and pick the latest version. This patch is a minor refinement on the behavior: now we try to pick the wired in package from just the list of exposed packages, and if there are no candidates fall back on the full list. This means that if you do: -hide-all-packages -package wired-in-OLD-VERSION it will actually work by default (whereas previously you needed to *explicitly* -ignore-package the newer version). This is especially useful for the 'ghc' package. Fixes #9955. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin Reviewed By: austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D603 GHC Trac Issues: #9955 (cherry picked from commit 1f159519)
-
- Jan 19, 2015
-
-
Sergei Trofimovich authored
Summary: This introduces new .cmm syntax for import: 'import' 'CLOSURE' <identifier>; Currently cmm syntax allows importing only function labels: import pthread_mutex_lock; but sometimes ghc needs to import global gariables or haskell closures: import ghczmprim_GHCziTypes_True_closure; import base_ControlziExceptionziBase_nestedAtomically_closure; import ghczmprim_GHCziTypes_False_closure; import sm_mutex; It breaks on ia64 where there is a difference in pointers to data and pointer to functions. Patch fixes threaded runtime on ia64 where dereference of 'sm_mutex' from CMM led to incurrect location. Exact breakage machanics are the same as in e18525fa Merge into the 7.10 branch Signed-off-by:
Sergei Trofimovich <siarheit@google.com> Test Plan: passes ./validate, makes ghci work on ghc-7.8.4 Reviewers: simonmar, simonpj, austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D622 (cherry picked from commit d82f5925)
-
Summary: A mutex is used to protect the SPT. unsafeLookupStaticPtr and staticPtrKeys in GHC.StaticPtr are made monadic. SPT entries are removed in a destructor function of modules. Authored-by:
Facundo Domínguez <facundo.dominguez@tweag.io> Authored-by:
Alexander Vershilov <alexander.vershilov@tweag.io> Test Plan: ./validate Reviewers: austin, simonpj, hvr Subscribers: carter, thomie, qnikst, mboes Differential Revision: https://phabricator.haskell.org/D587 GHC Trac Issues: #9878 (cherry picked from commit 7637810a)
-
jpm@cs.ox.ac.uk authored
(cherry picked from commit d8394939)
-
Peter Wortmann authored
- Don't bracket HsTick expression uneccessarily - Generate debug information in UTF8 - Reduce amount of information generated - we do not currently need block information, for example. Special thanks to slyfox for the reports! (cherry picked from commit 36df0988)
-
Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D618 (cherry picked from commit 6392df07)
-
Summary: Package environments are files with package IDs that indicate which packages should be visible; see entry in user guide for details. Reviewers: duncan, austin Reviewed By: duncan, austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D558 (cherry picked from commit 099b7676)
-
Gergő Érdi authored
I did a bit of refactoring at the same time, needless to say (cherry picked from commit 5830fc44)
-
Summary: Disallow wildcards in stand-alone deriving instances (StandaloneDeriving), default signatures (DefaultSignatures) and instances signatures (InstanceSigs). Test Plan: validate Reviewers: austin Reviewed By: austin Subscribers: carter, thomie, monoidal Differential Revision: https://phabricator.haskell.org/D595 GHC Trac Issues: #9922 (cherry picked from commit c9532f81)
-
Alexander Vershilov authored
Summary: The entries of the static pointers table are expected to exist as object code. Thus we have ghci complain with an intelligible error message if the static form is used in interpreted mode. It also includes a fix to keysHashTable in Hash.c which could cause a crash. The iteration of the hashtable internals was incorrect. This patch has the function keysHashTable imitate the iteration in freeHashTable. Finally, we submit here some minor edits to comments and GHC.StaticPtr.StaticPtrInfo field names. Authored-by:
Alexander Vershilov <alexander.vershilov@tweag.> Authored-by:
Facundo Domínguez <facundo.dominguez@tweag.io> Test Plan: ./validate Reviewers: simonpj, hvr, austin Reviewed By: austin Subscribers: carter, thomie, qnikst, mboes Differential Revision: https://phabricator.haskell.org/D586 GHC Trac Issues: #9878 (cherry picked from commit fffbf062)
-
Summary: see Trac #8624 similar functionality is now available with -ddump-to-file -ddump-splices However, users are already accustomed to -ddump-splices having a particular format, and this format is not completely valid code The goal of -th-file is to dump valid Haskell code Additionally, the convention of -ddump-to-file is to name the file after the flag, so the file is .dump-splices Given that the goal of the new flag is to generate valid Haskell, The extension should be .hs Additionally, -ddump-to-file effects all other dump flags Test Plan: look at the output of using the -th-file flag and compare it to the output of using -ddump-to-file and -ddump-splices I want to add test cases, but just need some pointers on getting started there Reviewers: thomie, goldfire, simonpj, austin Reviewed By: simonpj, austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D518 GHC Trac Issues: #8624 (cherry picked from commit 07ace5c2) Conflicts: docs/users_guide/7.12.1-notes.xml
-