summaryrefslogtreecommitdiff
path: root/testsuite
Commit message (Collapse)AuthorAgeFilesLines
* Make dataToQa aware of Data instances which use functions to implement toConstrRyanGlScott2015-10-138-4/+55
| | | | | | | | | | | | | | | | | | | | Trac #10796 exposes a way to make `template-haskell`'s `dataToQa` function freak out if using a `Data` instance that produces a `Constr` (by means of `toConstr`) using a function name instead of a data constructor name. While such `Data` instances are somewhat questionable, they are nevertheless present in popular libraries (e.g., `containers`), so we can at least make `dataToQa` aware of their existence. In order to properly distinguish strings which represent variables (as opposed to data constructors), it was necessary to move functionality from `Lexeme` (in `ghc`) to `GHC.Lexeme` in a new `ghc-boot` library (which was previously named `bin-package-db`). Reviewed By: goldfire, thomie Differential Revision: https://phabricator.haskell.org/D1313 GHC Trac Issues: #10796
* testsuite: attempt fixing T10935 outputAustin Seipp2015-10-121-1/+6
| | | | | | | | This fallout was caused by f8fbf385b879fe17740 (see #10935), and looks easy enough, but admittedly I just tried patching the output, so we're doing it live. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Don't inline/apply other rules when simplifying a rule RHS.Andrew Farmer2015-10-121-2/+0
| | | | | | | | | | | | | | | | HERMIT users depend on RULES to specify equational properties. 7.10.2 performed both inlining and simplification in both sides of the rules, meaning they can't really be used for this. This breaks most HERMIT use cases. A separate commit already disabled this for the LHS of rules. This does so for the RHS. See Trac #10829 for nofib results. Reviewed By: austin, bgamari, simonpj Differential Revision: https://phabricator.haskell.org/D1246 GHC Trac Issues: #10829
* Reinstate monomorphism-restriction warningsSimon Peyton Jones2015-10-123-0/+7
| | | | | | | | | | | | This patch is driven by Trac #10935, and reinstates the -fwarn-monomorphism-restriction warning. It was first lost in 2010: d2ce0f52d "Super-monster patch implementing the new typechecker -- at last" I think the existing documentation is accurate; it is not even turned on by -Wall. I added one test.
* Test Trac #10931Simon Peyton Jones2015-10-122-0/+26
|
* PPC: Fix right shift by 32 bits #10870Erik de Castro Lopo2015-10-123-0/+14
| | | | | | | | | | | | | | Summary: Test included. Test Plan: Run test T10870.hs on X86/X86_64/Arm/Arm64 etc Reviewers: bgamari, nomeata, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1322 GHC Trac Issues: #10870
* Testsuite: T3333 still fails on non-linux statically linked ghci (#3333)Thomas Miedema2015-10-101-1/+1
|
* Add short library names support to Windows linkerTamar Christina2015-10-108-13/+66
| | | | | | | | | | | | | | | Make Linker.hs try asking gcc for lib%s.dll as well, also changed tryGcc to pass -L to all components by using -B instead. These two fix shortnames linking on windows. re-enabled tests: ghcilink003, ghcilink006 and T3333 Added two tests: load_short_name and enabled T1407 on windows. Reviewed By: thomie, bgamari Differential Revision: https://phabricator.haskell.org/D1310 GHC Trac Issues: #9878, #1407, #1883, #5289
* Move orphan instance/rule warnings to typechecker/desugarer.Edward Z. Yang2015-10-082-6/+6
| | | | | | | | | | | | | | | | | | | | | | Summary: Instead of doing these warnings at MkIface time, we do them when we create the instances/rules in the typechecker/desugarer. Emitting warnings for auto-generated instances was a pain (since the specialization monad doesn't have the capacity to emit warnings) so instead I just deprecated -fwarn-auto-orphans. Auto rule orphans are pretty harmless anyway: they don't cause interface files to be eagerly loaded in. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1297
* Tests for #10945 and #10946Jan Stolarek2015-10-083-0/+24
|
* Parser: revert some error messages to what they were before 7.10Thomas Miedema2015-10-077-3/+29
| | | | | | | | | | | | | | | | | Among doing other things, Phab:D201 (bc2289e13d9586be087bd8136943dc35a0130c88) tried to improve the error messages thrown by the parser. For example a missing else clause now prints "parse error in if statement: else clause empty" instead of "parse error (possibly incorrect indentation or mismatched brackets)". Some error messages got much worse however (see tests), and the result seems to be a net negative. Although not entirely satisfactory, this commits therefore reverts those parser changes. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D1309 GHC Trac Issues: #10498
* Allow non-operator infix pattern synonymsMatthew Pickering2015-10-072-0/+6
| | | | | | | | | | | | | | For example ``` pattern head `Cons` tail = head : tail ``` Reviewed By: goldfire, austin Differential Revision: https://phabricator.haskell.org/D1295 GHC Trac Issues: #10747
* Improve error messages for ambiguous type variablesDavid Kraeutmann2015-10-0720-77/+99
| | | | | | | | | | | | | | | Improved error messages are only printed when the old message would be "No instance for...", since they're not as helpful for "Could not deduce..." No special test case as error messages are tested by other tests already. Signed-off-by: David Kraeutmann <kane@kane.cx> Reviewed By: austin, goldfire Differential Revision: https://phabricator.haskell.org/D1182 GHC Trac Issues: #10733
* Fix kind-var abstraction in SimplUtils.abstractFloatsSimon Peyton Jones2015-10-062-0/+39
| | | | | | | A missing 'closeOverKinds' triggered Trac #10934. Happily the fix is simple. Merge to 7.10.3
* Deduplicate one-shot/make compile paths.Edward Z. Yang2015-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We had a duplicate copy of the code for --make and for -c which was a pain. The call graph looked something like this: compileOne -> genericHscCompileGetFrontendResult -> genericHscFrontend hscCompileOneShot ---^ with genericHscCompileGetFrontendResult and hscCompileOneShot duplicating logic for deciding whether or not recompilation was needed. This patchset fixes it, so now everything goes through this call-chain: compileOne (--make entry point) Calls hscIncrementCompile, invokes the pipeline to do codegen and sets up linkables. hscIncrementalCompile (-c entry point) Calls hscIncrementalFrontend, and then simplifying, desugaring, and writing out the interface. hscIncrementalFrontend Performs recompilation avoidance, if recompilation needed, does parses typechecking. I also cleaned up some of the MergeBoot nonsense by introducing a FrontendResult type. NB: this BREAKS #8101 again, because I can't unconditionally desugar due to Haddock barfing on lint, see #10600 Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, bgamari, simonmar, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1302
* Testsuite: make driver python 2.6 compatible againThomas Miedema2015-10-051-6/+6
| | | | | | Reviewed by: kgardas Differential Revision: https://phabricator.haskell.org/D1311
* A few typos in commentsGabor Greif2015-10-051-1/+1
|
* Testsuite: only add -fno-warn-missed-specialisations for ghc>=7.11Thomas Miedema2015-10-042-0/+8
| | | | | | | | It should be possible to run the testsuite with older versions of GHC. Reviewed by: austin Differential Revision: https://phabricator.haskell.org/D1308
* Make Windows linker more robust to unknown sectionsTamar Christina2015-10-036-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Windows Linker has 3 main parts that this patch changes. 1) Identification and classification of sections 2) Adding of symbols to the symbols tables 3) Reallocation of sections 1. Previously section identification used to be done on a whitelisted basis. It was also exclusively being done based on the names of the sections. This meant that there was a bit of a cat and mouse game between `GCC` and `GHC`. Every time `GCC` added new sections there was a good chance `GHC` would break. Luckily this hasn't happened much in the past because the `GCC` versions `GHC` used were largely unchanged. The new code instead treats all new section as `CODE` or `DATA` sections, and changes the classifications based on the `Characteristics` flag in the PE header. By doing so we no longer have the fragility of changing section names. The one exception to this is the `.ctors` section, which has no differentiating flag in the PE header, but we know we need to treat it as initialization data. The check to see if the sections are aligned by `4` has been removed. The reason is that debug sections often time are `1 aligned` but do have relocation symbols. In order to support relocations of `.debug` sections this check needs to be gone. Crucially this assumption doesn't seem to be in the rest of the code. We only check if there are at least 4 bytes to realign further down the road. 2. The second loop is iterating of all the symbols in the file and trying to add them to the symbols table. Because the classification of the sections we did previously are (currently) not available in this phase we still have to exclude the sections by hand. If they don't we will load in symbols from sections we've explicitly ignored the in # 1. This whole part should rewritten to avoid this. But didn't want to do it in this commit. 3. Finally the sections are relocated. But for some reason the PE files contain a Linux relocation constant in them `0x0011` This constant as far as I can tell does not come from GHC (or I couldn't find where it's being set). I believe this is probably a bug in GAS. But because the constant is in the output we have to handle it. I am thus mapping it to the constant I think it should be `0x0003`. Finally, static linking *should* work, but won't. At least not if you want to statically link `libgcc` with exceptions support. Doing so would require you to link `libgcc` and `libstd++` but also `libmingwex`. The problem is that `libmingwex` also defines a lot of symbols that the RTS automatically injects into the symbol table. Presumably because they're symbols that it needs. like `coshf`. The these symbols are not in a section that is declared with weak symbols support. So if we ever want to get this working, we should either a) Ask mingw to declare the section as such, or b) treat all a imported symbols as being weak. Though this doesn't seem like it's a good idea.. Test Plan: Running ./validate for both x86 and x86_64 Also running the specific test case for #10672 make TESTS="T10672_x86 T10672_x64" Reviewed By: ezyang, thomie, austin Differential Revision: https://phabricator.haskell.org/D1244 GHC Trac Issues: #9907, #10672, #10563
* testsuite: Bump up haddock.base expected allocationsBen Gamari2015-10-031-1/+2
| | | | | This started intermittently failing as a result of D1239. I suspect this was just the straw that broke the camel's back however.
* Fill in associated type defaults with DeriveAnyClassRyanGlScott2015-10-033-0/+92
| | | | | | | | | | | | | | | | | | | | | | | Summary: Unlike `-XDefaultSignatures`, `-XDeriveAnyClass` would not fill in associated type family defaults when deriving a class which contained them. In order to fix this properly, `tcATDefault` needed to be used from `TcGenDeriv`. To avoid a module import cycle, `tcATDefault` was moved from `TcInstDcls` to `TcClsDcl`. Fixes #10361. Test Plan: ./validate Reviewers: kosmikus, dreixel, bgamari, austin, simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1283 GHC Trac Issues: #10361
* Enable `Enumeration is empty` warnings for `Integer`Herbert Valerio Riedel2015-10-033-0/+38
| | | | | | | | | | | | | | | | | | | | | This warning was implemented via abb3a9faa88fad3562ac41a148dd683765f47565 for addressing #7881. The bounded H2010 integral types were handled, but the `Integer` type was missed for the enumeration warning. Fixes #10929 Test Plan: reused T7881 testcase Reviewers: thomie, bgamari, austin Reviewed By: thomie, bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1305 GHC Trac Issues: #10929
* Make GHC generics capable of handling unboxed typesRyanGlScott2015-10-037-23/+79
| | | | | | | | | | | | | | | | | | | | | | | | This adds a data family (`URec`) and six data family instances (`UAddr`, `UChar`, `UDouble`, `UFloat`, `UInt`, and `UWord`) which a `deriving Generic(1)` clause will generate if it sees `Addr#`, `Char#`, `Double#`, `Float#`, `Int#`, or `Word#`, respectively. The programmer can then provide instances for these data family instances to provide custom implementations for unboxed types, similar to how derived `Eq`, `Ord`, and `Show` instances currently special-case unboxed types. Fixes #10868. Test Plan: ./validate Reviewers: goldfire, dreixel, bgamari, austin, hvr, kosmikus Reviewed By: dreixel, kosmikus Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D1239 GHC Trac Issues: #10868
* Testsuite: update expected output for T8602Thomas Miedema2015-10-031-1/+1
|
* Fix broken validation Build 6564 and accepting a few other test resultsTamar Christina2015-10-034-11/+16
| | | | | | | | | | | | Test Plan: ./validate Reviewers: thomie, austin, bgamari Reviewed By: bgamari Subscribers: #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D1304
* Prevent GHC from silently dying when preprocessor is not foundTamar Christina2015-10-034-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Windows preprocessor code calls `runInteractiveProcess` but does not check if an exception is thrown. `runInteractiveProcess` calls `CreateProcess` which when given a format the system loader does not know about will throw an exception. This is what makes #9399 fail. Ultimately we should not use any `CreateProcess` based calls but instead `ShellExecuteEx` as this would allow us to run applications that the shell knows about instead of just the loader. More details on #365. This patch removes `PhaseFailed` and throws `ProgramError` instead. `PhaseFailed` was largely unneeded since it never gave very useful information aside from the `errorcode` which was almost always `1`. `IOErrors` have also been eliminated and `GhcExceptions` thrown in their place wherever possible. Updates haddock submodule. Test Plan: `./validate` to make sure anything didn't break and `make TESTS="T365"` to test that an error is now properly thrown Reviewers: austin, thomie, bgamari Reviewed By: thomie, bgamari Subscribers: #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D1256 GHC Trac Issues: #365
* Fix treatment of -0.0Ben Gamari2015-10-025-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here we fix a few mis-optimizations that could occur in code with floating point comparisons with -0.0. These issues arose from our insistence on rewriting equalities into case analyses and the simplifier's ignorance of floating-point semantics. For instance, in Trac #10215 (and the similar issue Trac #9238) we turned `ds == 0.0` into a case analysis, ``` case ds of __DEFAULT -> ... 0.0 -> ... ``` Where the second alternative matches where `ds` is +0.0 and *also* -0.0. However, the simplifier doesn't realize this and will introduce a local inlining of `ds = -- +0.0` as it believes this is the only value that matches this pattern. Instead of teaching the simplifier about floating-point semantics we simply prohibit case analysis on floating-point scrutinees and keep this logic in the comparison primops, where it belongs. We do several things here, - Add test cases from relevant tickets - Clean up a bit of documentation - Desugar literal matches against floats into applications of the appropriate equality primitive instead of case analysis - Add a CoreLint to ensure we don't pattern match on floats in Core Test Plan: validate with included testcases Reviewers: goldfire, simonpj, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1061 GHC Trac Issues: #10215, #9238
* .gitignore update for some test files.Edward Z. Yang2015-09-301-27/+66
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* reify associated types when reifying typeclasses(#10891)Ömer Sinan Ağacan2015-09-264-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported in Trac #10891, Template Haskell's `reify` was not generating Decls for associated types. This patch fixes that. Note that even though `reifyTyCon` function used in this patch returns some type instances, I'm ignoring that. Here's an example of how associated types are encoded with this patch: (Simplified representation) class C a where type F a :: * --> OpenTypeFamilyD "F" ["a"] With default type instances: class C a where type F a :: * type F a = a --> OpenTypeFamilyD "F" ["a"] TySynInstD "F" (TySynEqn [VarT "a"] "a") Test Plan: This patch was already reviewed and even merged. The patch is later reverted because apparently it broke the build some time between the validation of this patch and merge. Creating this new ticket to fix the validation. Reviewers: goldfire, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1277 GHC Trac Issues: #10891
* Skip a possible BOM in utf8 encodingJoachim Breitner2015-09-252-0/+4
| | | | | | | | and not the system locale, which might be something else. This fixes bug #10907. A test is added, but less useful than it could be until task #10909 is done. Differential Revision: D1274
* Testsuite: add test for #10767Thomas Miedema2015-09-242-0/+49
|
* Testsuite: properly fix T8832.stdout-ws-32 (#8832)Thomas Miedema2015-09-241-8/+8
|
* Testsuite: update expected output for T8832 on 32-bit systems (#8832)Thomas Miedema2015-09-241-0/+1
|
* Fix DeriveGeneric for types with same OccName (#10487)Ömer Sinan Ağacan2015-09-246-130/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: DeriveGeneric generates some data types (for data type constructors and for selectors of those constructors) and instances for those types. This patch changes name generation for these new types to make it working with data types with same names imported from different modules and with data types with same names imported from same modules(using module imports). Bonus content: - Some refactoring in `TcGenGenerics.metaTyConsToDerivStuff` to remove some redundant partial function applications and to remove a duplicated function. - Remove some unused names from `OccName`. (those were used for an old implementation of `DeriveGeneric`) Reviewers: kosmikus, simonpj, dreixel, ezyang, bgamari, austin Reviewed By: bgamari, austin Subscribers: ezyang, thomie Differential Revision: https://phabricator.haskell.org/D1081 GHC Trac Issues: #10487
* Fix a bug with mallocForeignPtr and finalizers (#10904)Simon Marlow2015-09-243-0/+62
| | | | | | | | | | | | Summary: See Note [MallocPtr finalizers] Test Plan: validate; new test T10904 Reviewers: ezyang, bgamari, austin, hvr, rwbarton Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1275
* Revert "reify associated types when reifying typeclasses"Austin Seipp2015-09-234-54/+0
| | | | | | This caused the build to fail, due to some type checking errors. Whoops. This reverts commit 5c115236fe795aa01f0c10106f1b1c959486a739.
* reify associated types when reifying typeclassesÖmer Sinan Ağacan2015-09-234-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported in Trac #10891, Template Haskell's `reify` was not generating Decls for associated types. This patch fixes that. Note that even though `reifyTyCon` function used in this patch returns some type instances, I'm ignoring that. Here's an example of how associated types are encoded with this patch: (Simplified representation) class C a where type F a :: * --> OpenTypeFamilyD "F" ["a"] With default type instances: class C a where type F a :: * type F a = a --> OpenTypeFamilyD "F" ["a"] TySynInstD "F" (TySynEqn [VarT "a"] "a") Reviewed By: goldfire Differential Revision: https://phabricator.haskell.org/D1254 GHC Trac Issues: #10891
* Update Cabal to recognize DeriveLiftRyanGlScott2015-09-233-4/+1
| | | | | | | | | | | | This should (1) fix the ./validate build, which I accidentally broke in D1168, and (2) update the Cabal submodule so that it recognizes `DeriveLift` as a GHC extension. Reviewed By: adamse, austin Differential Revision: https://phabricator.haskell.org/D1269 GHC Trac Issues: #1830
* Add constant-folding rule for Data.Bits.bitBen Gamari2015-09-233-12/+13
| | | | | | | | | | | This adds a constant-folding rule for `Integer`'s implementation of `bit` and fixes the `T8832` testcase. Fixes #8832. Reviewed By: simonpj, austin Differential Revision: https://phabricator.haskell.org/D1255 GHC Trac Issues: #8832
* testsuite: attempt fixing fallout from 089b72f52Austin Seipp2015-09-239-10/+10
| | | | | | | A few tests had the same name which is a big no-no, so I reorganized them a little. The naming is somewhat haphazard, though... Signed-off-by: Austin Seipp <austin@well-typed.com>
* DeriveLift extension (#1830)RyanGlScott2015-09-2110-1/+93
| | | | | | | | | | | | | | | | | | | | Summary: This implements -XDeriveLift, which allows for automatic derivation of the Lift class from template-haskell. The implementation is based off of Ian Lynagh's th-lift library (http://hackage.haskell.org/package/th-lift). Test Plan: ./validate Reviewers: hvr, simonpj, bgamari, goldfire, austin Reviewed By: goldfire, austin Subscribers: osa1, thomie Differential Revision: https://phabricator.haskell.org/D1168 GHC Trac Issues: #1830
* base: use Show for ErrorCall in uncaughtExceptionHandlerEric Seidel2015-09-2123-3/+51
| | | | | | | | | | | | | The default top-level exception handler now uses the `Show` instance for `ErrorCall` when printing exceptions, so it will actually print the out-of-band data (e.g. `CallStack`s) in compiled binaries, instead of just printing the error message. This also updates the hpc submodule to fix the test output. Reviewed By: austin, thomie Differential Revision: https://phabricator.haskell.org/D1217
* Unify hsig and hs-boot; add preliminary "hs-boot" merging.Edward Z. Yang2015-09-2139-47/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch drops the file level distinction between hs-boot and hsig; we figure out which one we are compiling based on whether or not there is a corresponding hs file lying around. To make the "import A" syntax continue to work for bare hs-boot files, we also introduce hs-boot merging, which takes an A.hi-boot and converts it to an A.hi when there is no A.hs file in scope. This will be generalized in Backpack to merge multiple A.hi files together; which means we can jettison the "load multiple interface files" functionality. This works automatically for --make, but for one-shot compilation we need a new mode: ghc --merge-requirements A will generate an A.hi/A.o from a local A.hi-boot file; Backpack will extend this mechanism further. Has Haddock submodule update to deal with change in msHsFilePath behavior. - This commit drops support for the hsig extension. Can we support it? It's annoying because the finder code is written with the assumption that where there's an hs-boot file, there's always an hs file too. To support hsig, you'd have to probe two locations. Easier to just not support it. - #10333 affects us, modifying an hs-boot still doesn't trigger recomp. - See compiler/main/Finder.hs: this diff is very skeevy, but it seems to work. - This code cunningly doesn't drop hs-boot files from the "drop hs-boot files" module graph, if they don't have a corresponding hs file. I have no idea if this actually is useful. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari, spinda Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1098
* Revert "Revert "Revert "Support for multiple signature files in scope."""Edward Z. Yang2015-09-2127-224/+1
| | | | This reverts commit 214596de224afa576a9c295bcf53c6941d6892e0.
* Run simplifier only when the env is clean.Richard Eisenberg2015-09-212-32/+4
| | | | | | | | | | | | | This fixes #10896. In the indexed-types/should_fail/BadSock test, there is a bad type definition. This gets type-checked, an error gets reported, but then **GHC keeps going**. Later, when running the simplifier to do an ambiguity check, the bad type environment causes GHC to fall over. My solution: only run the simplifier in a clean, error-free type environment. A downside of this is that fewer error messages are reported. This makes me a bit sad, but I'm not sure how to avoid the problem. Suggestions welcome.
* Perform a validity check on assoc type defaults.Richard Eisenberg2015-09-216-0/+35
| | | | | | | | | This fixes #10817 and #10899. A knock-on effect is that we must now remember locations of associated type defaults for error messages during validity checking. This isn't too bad, but it increases the size of the diff somewhat. Test cases: indexed-types/should_fail/T108{17,99}
* Slightly better `Coercible` errors.Richard Eisenberg2015-09-215-0/+42
| | | | | | | | | | | | | | | This makes two real changes: - Equalities like (a ~R [a]) really *are* insoluble. Previously, GHC refused to give up when an occurs check bit on a representational equality. But for datatypes, it really should bail. - Now, GHC will sometimes report an occurs check error (in cases above) for representational equalities. Previously, it never did. This "fixes" #10715, where by "fix", I mean clarifies the error message. It's unclear how to do more to fix that ticket. Test cases: typecheck/should_fail/T10715{,b}
* Fix typo in test for #10347.Richard Eisenberg2015-09-211-1/+1
| | | | Thanks to Gabor Greif for spotting the mistake.
* Small improvement in pretty-printing constructors.Richard Eisenberg2015-09-203-0/+9
| | | | | | | | | This fixes #10810 by cleaning up pretty-printing of constructor declarations. This change also removes a (in my opinion) deeply bogus orphan instance OutputableBndr [Located name], making HsDecls now a non-orphan module. Yay all around. Test case: th/T10810
* Re-polish error messages around injective TFs.Richard Eisenberg2015-09-203-37/+48
| | | | The previous message was wrong, as pointed out by Jan Stolarek.