summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Make annotations test case cleaning less aggressivewip/validateJoachim Breitner2014-12-021-3/+6
| | | | cf. a4ec0c92
* Declare official GitHub home of libraries/parallelHerbert Valerio Riedel2014-12-022-1/+1
| | | | | Effective immediately, pushing to the `libraries/parallel` submodule requires pushing via ssh://git@github.com/haskell/parallel.git.
* Make `read . show = id` for Data.Fixed (fix #9240)Brian McKenna2014-12-024-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QuickCheck property now succeeds: prop :: Fixed B7 -> Bool prop a = read (show a) == a This changes the Show instance for Fixed to round up, rather than down when calculating a digit. This needs to happen because Read also rounds down: data B7 instance HasResolution B7 where resolution _ = 128 1 / 128 = 0.0078125 read "0.007" = (0.000 :: Fixed B7) Here is an example of the change to Show: showFixed False (0.009 :: Fixed B7) -- Broken: "0.007" -- Fixed: "0.008" And now Read can continue to round down: read "0.008" = (0.0078125 :: Fixed B7) Reviewed By: hvr, ekmett Differential Revision: https://phabricator.haskell.org/D547
* Make Natural's (.|.) really an OR operation (#9818)Herbert Valerio Riedel2014-12-021-3/+3
| | | | | | | | Currently it's an AND when at least one of the operands is big. Reviewed By: hvr Differential Revision: https://phabricator.haskell.org/D549
* Unique-ify the names of top-level auxiliary bindings in derived instances ↵Simon Peyton Jones2014-12-025-8/+64
| | | | | | | | (Trac #7947) The problem and its solution are explained in Note [Auxiliary binders] in TcGenDeriv
* Fix another bug in deriving( Data ) for data families; Trac #4896Simon Peyton Jones2014-12-023-9/+46
| | | | | | | | | | | | | | | | | | | | | | | If we have data family D a data instance D (a,b,c) = ... deriving( Data ) then we want to generate instance ... => Data (D (a,b,c)) where ... dataCast1 x = gcast1 x The "1" here comes from the kind of D. But the kind of the *representation* TyCon is data Drep a b c = .... ie Drep :: * -> * -> * -> * So we must look for the *family* TyCon in this (rather horrible) dataCast1 / dataCast2 binding.
* Minor refactoring of Edward's recent orphans patch (Trac #2182)Simon Peyton Jones2014-12-028-252/+289
| | | | | | | This patch is all small stuff - Move VisibleOrphanModules from Module to InstEnv (with the other orphan stuff) - Move Notes about orphans from IfaceSyn to InstEnv (ditto) - Make use of the record field names in InstEnvs
* Test Trac #4921Simon Peyton Jones2014-12-023-0/+32
|
* Rename Untouchables to TcLevelSimon Peyton Jones2014-12-0215-179/+181
| | | | | | | | This is a long-overdue renaming Untouchables --> TcLevel It is renaming only; no change in functionality. We really wanted to get this done before the 7.10 fork.
* Remove references to SynTyCon. Fixes #9812Jan Stolarek2014-12-024-10/+12
|
* Comments and formatting in TyConJan Stolarek2014-12-021-81/+118
|
* Fix test suite race on T5462 (solves intermittent ↵Edward Z. Yang2014-12-022-5/+5
| | | | | | T5462Yes1/T5462Yes2/T5462No1 failure) Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Revert "Make the linker API thread-safe"Simon Peyton Jones2014-12-027-89/+41
| | | | | | | | | | | | | | | | This reverts commit b5e8b3b162b3ff15ae6caf1afc659565365f54a8. I reverted it because one of these two patches 9e6e4796437a7fc23e83605a45db9b2663570123 Add purgeObj() b5e8b3b162b3ff15ae6caf1afc659565365f54a8 Make the linker API thread-safe causes a seg-fault on Windows. The seg-fault happens immediately the linker is invoked, in ghci or in Template Haskell. I believe that it is the "linker API thread-safe" commit that causes the seg-fault; it happens even if the "purgeObj" commit alone is reverted. But since the two patches mess with the same code, to revert the "linker API" patch I had revert both.
* Revert "Add purgeObj() to remove the symbol table entries for an object"Simon Peyton Jones2014-12-024-92/+24
| | | | | | | | | | | | | | | | This reverts commit 9e6e4796437a7fc23e83605a45db9b2663570123. I reverted it because one of these two patches 9e6e4796437a7fc23e83605a45db9b2663570123 Add purgeObj() b5e8b3b162b3ff15ae6caf1afc659565365f54a8 Make the linker API thread-safe causes a seg-fault on Windows. The seg-fault happens immediately the linker is invoked, in ghci or in Template Haskell. I believe that it is the "linker API thread-safe" commit that causes the seg-fault; it happens even if the "purgeObj" commit alone is reverted. But since the two patches mess with the same code, to revert the "linker API" patch I had revert both.
* Uncomment the instance signatures, to activate the testSimon Peyton Jones2014-12-021-3/+3
|
* Mention existence of 'Natural' in "Data.Word"Herbert Valerio Riedel2014-12-021-4/+2
| | | | | This replaces the note mentioning the lack of a `Natural`-type by a note pointing to the new "Numeric.Natural" (#9818) module.
* Fix malformed `configure` scriptHerbert Valerio Riedel2014-12-011-2/+1
| | | | | | | | | | | | Don't pass empty string `[]` as "action-if-not-given" to `AC_ARG_ENABLE()` macro, as this would otherwise lead to an empty else-block in the resulting bash `configure` script. This bug was introduced via cb0a503a. This issue was pointed out by @christiaanb Reviewed By: christiaanb Differential Revision: https://phabricator.haskell.org/D545
* Fix parser for UNPACK pragmasSimon Peyton Jones2014-12-011-5/+5
| | | | | | | | {-# NOUNPACK #-} {-# NOUNPACK #-} ! were being parsed the same way. The former was wrong. Thanks to Alan Zimmerman for pointing this out
* Test Trac #7908Simon Peyton Jones2014-12-012-1/+50
| | | | | Fixed by e6a2050ebb6da316aecec66a6795715fbab355ca along with #9582, #9833
* Remove references to Parser.y.ppThomas Miedema2014-12-013-6/+3
| | | | | | | | | | | | | | Summary: Commit 37d64a51348a803a1cf974d9e97ec9231215064a removed the preprocessing step for Parser.y. Reviewers: rodlogic, austin Reviewed By: austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D543
* Wibble to the "instance signatures" patchSimon Peyton Jones2014-12-011-1/+1
| | | | Sorry about this. I somehow failed to include this one line in my patch.
* Fix the handling of instance signatures (Trac #9582, #9833)Simon Peyton Jones2014-12-0112-79/+157
| | | | | | | | | This finally solves the issue of instance-method signatures that are more polymorphic than the instanted class method. See Note [Instance method signatures] in TcInstDcls. A very nice fix for the two Trac tickets above.
* unlit compiler/types/ modulesHerbert Valerio Riedel2014-12-0114-637/+504
| | | | Differential Revision: https://phabricator.haskell.org/D544
* unlit compiler/stranal/ modulesHerbert Valerio Riedel2014-12-013-129/+121
| | | | | | Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D541
* Revert "Remove RAWCPP_FLAGS"Herbert Valerio Riedel2014-12-013-4/+13
| | | | | | | | | | | | This reverts commit 460eebec65811c6a7bbe11645df322dda868e80d. Thomas requested to revert the commit with the words: > Please revert this commit, it is horribly wrong. I'll have a proper look > later, but not supplying `-traditional` to the C preprocessor is the cause > of #9828. the reverted commit was related to #9094
* Unlit AsmCodeGen.lhsHerbert Valerio Riedel2014-11-301-4/+0
| | | | Fwiw, this wasn't really a proper .lhs to begin with...
* Unlit compiler/cmm/ module(s)Herbert Valerio Riedel2014-11-301-32/+23
| | | | | | | | | | Reviewers: austin Reviewed By: austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D540
* Update docs: instance visibility bug is no more.Edward Z. Yang2014-11-301-11/+0
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* compiler: fix trac issue #8815Sivaram Balakrishnan2014-11-301-1/+2
| | | | | | | | | | | | | | Summary: This patch changes the error message as suggested in trac issue #8815 comments. Reviewers: jstolarek, austin Reviewed By: jstolarek, austin Subscribers: jstolarek, thomie, carter Differential Revision: https://phabricator.haskell.org/D533 GHC Trac Issues: #8815
* compiler: unlit profiling/ modulesAustin Seipp2014-11-302-10/+4
| | | | | | | | | | | | Summary: Signed-off-by: Austin Seipp <austin@well-typed.com> Test Plan: `./validate` Reviewers: hvr Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D537
* Fix obscure problem with using the system linker (#8935)Peter Trommler2014-11-303-33/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In a statically linked GHCi symbol `environ` resolves to NULL when called from a Haskell script. When resolving symbols in a Haskell script we need to search the executable program and its dependent (DT_NEEDED) shared libraries first and then search the loaded libraries. We want to be able to override functions in loaded libraries later. Libraries must be opened with local scope (RTLD_LOCAL) and not global. The latter adds all symbols to the executable program's symbols where they are then searched in loading order. We want reverse loading order. When libraries are loaded with local scope the dynamic linker cannot use symbols in that library when resolving the dependencies in another shared library. This changes the way files compiled to object code must be linked into temporary shared libraries. We link with the last temporary shared library created so far if it exists. Since each temporary shared library is linked to the previous temporary shared library the dynamic linker finds the latest definition of a symbol by following the dependency chain. See also Note [RTLD_LOCAL] for a summary of the problem and solution. Cherry-picked commit 2f8b4c Changed linker argument ordering On some ELF systems GNU ld (and others?) default to --as-needed and the order of libraries in the link matters. The last temporary shared library, must appear before all other libraries. Switching the position of extra_ld_inputs and lib_path_objs does that. Fixes #8935 and #9186 Reviewers: austin, hvr, rwbarton, simonmar Reviewed By: simonmar Subscribers: thomie, carter, simonmar Differential Revision: https://phabricator.haskell.org/D349 GHC Trac Issues: #8935, #9186, #9480
* Add bash completion and READMELennart Kolmodin2014-11-302-0/+103
| | | | | | | | | | | | | | | | | Summary: The bash completion is simple but works both for ghc and ghci. The README explains to the user what they have to do to get it working (hopefully nothing). Test Plan: Follow the README, then enjoy the cli completion in your terminal! Reviewers: austin Subscribers: thomie, carter, jstolarek Differential Revision: https://phabricator.haskell.org/D536 GHC Trac Issues: #9005
* More Tweaks for API AnotationsAlan Zimmerman2014-11-308-47/+94
| | | | | | | | | | | | | | Summary: Attaching semis to preceding AST element, not following Test Plan: sh ./validate Reviewers: hvr, austin Reviewed By: austin Subscribers: cactus, thomie, carter Differential Revision: https://phabricator.haskell.org/D529
* Shorten long lines in DynFlags, add details to ghci usage guide.Lennart Kolmodin2014-11-302-393/+504
| | | | | | | | | | | | | | | | Summary: Shorten long lines in DynFlags. Describe --show-options in ghci usage guide. Reviewers: jstolarek, austin Reviewed By: jstolarek, austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D532 GHC Trac Issues: #9259
* Filter instance visibility based on set of visible orphans, fixes #2182.ghc-instvisEdward Z. Yang2014-11-2934-98/+429
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Amazingly, the fix for this very old bug is quite simple: when type-checking, maintain a set of "visible orphan modules" based on the orphans list of modules which we explicitly imported. When we import an instance and it is an orphan, we check if it is in the visible modules set, and if not, ignore it. A little bit of refactoring for when orphan-hood is calculated happens so that we always know if an instance is an orphan or not. For GHCi, we preinitialize the visible modules set based on the list of interactive imports which are active. Future work: Cache the visible orphan modules set for GHCi, rather than recomputing it every type-checking round. (But it's tricky what to do when you /remove/ a module: you need a data structure a little more complicated than just a set of modules.) Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: new tests and validate Reviewers: simonpj, austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D488 GHC Trac Issues: #2182
* Special case interactive package key for mkQualPackage.Edward Z. Yang2014-11-291-1/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Reimplement `gcdExtInteger` (#9281)Herbert Valerio Riedel2014-11-294-11/+116
| | | | | `gcdExtInteger` has been available since `integer-gmp-0.5.1` (added via 71e29584603cff38e7b83d3eb28b248362569d61)
* Re-implement `recipModInteger` (#9281)Herbert Valerio Riedel2014-11-294-10/+124
| | | | | | | | | | | | This also exposes the following two type-specialised modular exponentiation variants of `recipModInteger` useful for implementing a `recipModNatural` operation. recipModBigNat :: BigNat -> BigNat -> BigNat recipModWord :: Word# -> Word# -> Word# `recipModInteger` has been available since `integer-gmp-0.5.1` (added via 4d516855241b70eb687d95e3c121428de885e83e)
* Implement `GHC.Natural.powModNatural` (#9818)Herbert Valerio Riedel2014-11-291-0/+40
| | | | | | | | | | This makes use of the `powMod*` primitives provided by `integer-gmp-1.0.0`. This is the `Natural`-version of the related `GHC.Integer.GMP.Internals.powModInteger` operation. The fallback implementation uses a square and multiply algorithm, compared to which the optimized GMP-based implementation needs much less allocations due to in-place mutation during the computation.
* Re-implement `powModInteger` (#9281)Herbert Valerio Riedel2014-11-295-14/+215
| | | | | | | | | | | | | This also exposes the following type-specialised modular exponentiation variants of `powModInteger` useful for implementing a `powModNatural` operation. powModBigNat :: BigNat -> BigNat -> BigNat -> BigNat powModBigNatWord :: BigNat -> BigNat -> Word# -> Word# powModWord :: Word# -> Word# -> Word# -> Word# `powModInteger` has been available since `integer-gmp-0.5.1` (added via 4d516855241b70eb687d95e3c121428de885e83e)
* More static C initializer refactoringHerbert Valerio Riedel2014-11-291-23/+29
| | | | | | | A few instances were missed in 447f592697fef04d1e19a2045ec707cfcd1eb59f Moreover, be more paranoid when testing for zero values, and try harder to avoid passing denormalized zero `mpz_t`-values into GMP functions.
* Fix testsuite failures after the PartialTypeSignatures mergeThomas Winant2014-11-291-6/+10
| | | | | | | | | | | | | | | Summary: Properly detect insoluble wanteds This used to be correct, but was recently incorrectly refactored. Reviewers: austin, hvr Reviewed By: austin, hvr Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D531
* Minor refactoring of static C initializersHerbert Valerio Riedel2014-11-291-29/+13
|
* Update submodule 'haddock' to render 'pattern' as a keywordDr. ERDI Gergo2014-11-291-0/+0
|
* Implement Partial Type SignaturesThomas Winant2014-11-28219-238/+3394
| | | | | | | | | | | | | | | | | | | | Summary: Add support for Partial Type Signatures, i.e. holes in types, see: https://ghc.haskell.org/trac/ghc/wiki/PartialTypeSignatures This requires an update to the Haddock submodule. Test Plan: validate Reviewers: austin, goldfire, simonpj Reviewed By: simonpj Subscribers: thomie, Iceland_jack, dominique.devriese, simonmar, carter, goldfire Differential Revision: https://phabricator.haskell.org/D168 GHC Trac Issues: #9478
* Rename some of the functions in NameSet, to make the uniform with VarSet etcSimon Peyton Jones2014-11-2830-109/+109
| | | | | | | | | | | | | For ages NameSet has used different names, eg. addOneToNameSet rather than extendNameSet nameSetToList rather than nameSetElems etc. Other set-like modules use uniform naming conventions. This patch makes NameSet follow suit. No change in behaviour; this is just renaming. I'm doing this just before the fork so that merging is easier.
* Kind variables in RHS of an associated type instances should be bound on LHSSimon Peyton Jones2014-11-289-58/+73
| | | | | | | | | | | | | | | | | | | | | | | This patche fixes Trac #9574. The previous Note [Renaming associated types] in RnTypes appears to me to be wrong; it confused class and instance declarations. I have: * Treated kind and type variables uniformly. Both must be bound on the LHS of an associated type instance. Eg instance C ('KProxy :: KProxy o) where type F 'KProxy = NatTr (Proxy :: o -> *) is illegal because 'o' is not bound on the LHS of the instance. * Moved the Note to RnSource and fixed it up This improves the error message from T7938. However it made the code in T6118 incorrect. We had: instance SingE (a :: Maybe k) where type Demote a = Maybe (Demote (Any :: k)) and that is now rejected, rightly I think.
* Re-activate `integerGmpInternals` test (#9281)Herbert Valerio Riedel2014-11-282-26/+55
| | | | | | | | | | | | | | | | | | The `integerGmpInternals` test was disabled in c774b28f76ee4c220f7c1c9fd81585e0e3af0e8a as many of the primitives tested in that test weren't available yet w/ `integer-gmp2`. However, most operations have been reimplemented by now, with the exception of recipModInteger :: Integer -> Integer -> Integer gcdExtInteger :: Integer -> Integer -> (Integer, Integer) powModSecInteger :: Integer -> Integer -> Integer -> Integer powModInteger :: Integer -> Integer -> Integer -> Integer powInteger :: Integer -> Word -> Integer which are still missing, and will (time permitting) be reimplemented over time.
* Re-implement `nextPrimeInteger` predicate (#9281)Herbert Valerio Riedel2014-11-283-0/+102
| | | | | | | This also adds `nextPrimeWord#` and `nextPrimeBigNat` predicates. `nextPrimeInteger` has been available since `integer-gmp-0.5.1` (added via f49735486533842cc84df70cafc8d565dffd75db).
* Add purgeObj() to remove the symbol table entries for an objectSimon Marlow2014-11-284-24/+92
| | | | | | | | This allows us to replace an object without actually unloading the old object, which is necessary when we know we have references to the old object so it can't be completely unloaded. Using unloadObj() would cause the GC (CheckUnload) to repeatedly and fruitlessly try to unload the old object.