- 05 Dec, 2015 1 commit
-
-
Georgios Karachalias authored
-
- 04 Dec, 2015 27 commits
-
-
Sergei Trofimovich authored
Summary: Currently libdw requires per-arch implementation of set_initial_registers() function. Otherwise build fails with linkage error (seen on sparc): rts/dist/build/libHSrts_thr-ghc7.11.20151129.so: undefined reference to `set_initial_registers' collect2: error: ld returned 1 exit status `gcc' failed in phase `Linker'. (Exit code: 1) make[1]: *** [ghc/stage2/build/tmp/ghc-stage2] Error 1 Converted link-time error to compile-time error, added arch whitelist. Signed-off-by:
Sergei Trofimovich <siarheit@google.com> Reviewers: austin, thomie, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1567
-
Ömer Sinan Ağacan authored
Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1563
-
Ben Gamari authored
In particular Clang rejects uses of CPP macros where the argument list is separated by a space from the macro name. Warn when we see ASSERT used in this way.
-
This should catch mistakes like a703fbce. Adds an arcanist-external-json-linter submodule, which should eventually be mirrored on haskell.org resources. Test Plan: Validate Reviewers: thomie, hvr, austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D1515
-
Ben Gamari authored
Interestingly enough this decreased with the new pattern checker. I'm not entirely sure why at the moment as the test is merely a large record with a bunch of selectors. I wouldn't have thought this would tax the pattern checker particularly much but oh well.
-
Ben Gamari authored
This was a duplicate.
-
Ben Gamari authored
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
Trac #11144 showed that we need to tidy the type in the error message generated in TcValidity.checkUserTypeError. This is still unsatisfactory. checkValidType was originally supposed to be called only on types gotten directly from user-written HsTypes. So its error messages do no tidying. But TcBinds calls it checkValidType on an /inferred/ type, which may need tidying. Still this at least fixes the bad error message in CustomTypeErrors02, which was the original ticket. Some other small refactorings: * Remove unused Kind result of getUserTypeErrorMsg * Rename isUserErrorTy --> userTypeError_maybe
-
Simon Peyton Jones authored
* Remove unused Kind result of getUserTypeErrorMsg * Rename isUserErrorTy --> userTypeError_maybe
-
Simon Peyton Jones authored
This terrible and long-standing bug was shown up by Trac #11148. We are trying to eta-reduce a data family instance, so that we can then derive Functor or Generic. But we were assuming, for absolutely not reason whatsoever, that the type variables were lined up in a convenient order. The fact that it ever worked was a fluke. This patch fixes it properly. Main change is in eta_reduce in TcInstDcls.tcDataFamInstDecl
-
Simon Peyton Jones authored
Just for debugging
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
This fixes Trac #11016 See Note [Add deriveds for signature contexts] in TcSimplify]
-
Simon Peyton Jones authored
As you'll see from Trac #11155, the code generator was confused by a binding let x = y in .... Why did that happen? Because of a (case y of {}) expression on the RHS. The right thing is just to expand what a "trivial" expression is. See Note [Empty case is trivial] in CoreUtils.
-
Bartosz Nitka authored
This fixes a non-determinism bug where where depending on the order of uniques allocated, the specialized workers would have different order of arguments. Compare: ``` $s$wgo_s1CN :: Int# -> Int -> Int# [LclId, Arity=2, Str=DmdType <L,U><L,U>] $s$wgo_s1CN = \ (sc_s1CI :: Int#) (sc_s1CJ :: Int) -> case tagToEnum# @ Bool (<=# sc_s1CI 0#) of _ [Occ=Dead] { False -> $wgo_s1BU (Just @ Int (I# (-# sc_s1CI 1#))) (Just @ Int sc_s1CJ); True -> 0# } ``` vs ``` $s$wgo_s18mTj :: Int -> Int# -> Int# [LclId, Arity=2, Str=DmdType <L,U><L,U>] $s$wgo_s18mTj = \ (sc_s18mTn :: Int) (sc_s18mTo :: Int#) -> case tagToEnum# @ Bool (<=# sc_s18mTo 0#) of _ [Occ=Dead] { False -> $wgo_s18mUc (Just @ Int (I# (-# sc_s18mTo 1#))) (Just @ Int sc_s18mTn); True -> 0# } ``` Test Plan: I've added a new testcase ./validate Reviewers: simonmar, simonpj, austin, goldfire, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1508 GHC Trac Issues: #4012
-
Ben Gamari authored
It uses so much memory that it would be unsafe to even allow it to run as it may jeopardize the stability of the build-bots.
-
Ben Gamari authored
This appears to be due to the new exhaustiveness checker. See #11163.
-
Ben Gamari authored
The new pattern match checker increased allocations by over 100%. Tracking in #11162.
-
Ben Gamari authored
-
Herbert Valerio Riedel authored
We already do this for UTF8/16/32, so it seems obvious do the same for the closely related popular ISO 8859-1 encoding, and avoid iconv issues on some platforms (such as AIX which which bundles a broken `libiconv` by default) This fixes #11096
-
Ben Gamari authored
-
Herbert Valerio Riedel authored
As otherwise <math.h> includes <stdlib.h> which breaks compilation of .hc files
-
Herbert Valerio Riedel authored
On AIX, C system headers can redirect the token `stat` via #define stat stat64 to provide large-file support. Simply avoiding the use of `stat` as an identifier eschews macro-replacement. Differential Revision: https://phabricator.haskell.org/D1566
-
Herbert Valerio Riedel authored
This takes care of setting feature test macros (i.e. let Autoconf decide when those can be set safely) to allow subsequent Autoconf tests to better detect available OS features. This also includes a submodule update of unix which enables the use of `AC_USE_SYSTEM_EXTENSIONS` in there as well. Specifically, this takes care of setting `_GNU_SOURCE` (which allows to remove two occurences where it's set manually) and `_ALL_SOURCE` (which fixes issues on AIX). See also https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Posix-Variants.html for details. At some point we may want to reconsider the purpose of "rts/PosixSource.h" and rely more on Autoconf instead.
-
Georgios Karachalias authored
-
Georgios Karachalias authored
Two changes: 1. Instead of generating constraints of the form (x ~ e) (as we do in the paper), generate constraints of the form (e ~ e). The term oracle (`tmOracle` in deSugar/TmOracle.hs) is not really efficient and in the presence of many (x ~ e) constraints behaves quadratically. For literals, constraints of the form (False ~ (x ~ lit)) are pretty common, so if we start with { y ~ False, y ~ (x ~ lit) } we end up givng to the solver (a) twice as many constraints as we need and (b) half of them trigger the solver's weakness. This fixes #11160. 2. Treat two overloaded literals that look different as different. This is not entirely correct but it is what both the previous and the current check did. I had the ambitious plan to do the *right thing* (equality between overloaded literals is undecidable in the general case) and just use this assumption when issuing the warnings. It seems to generate much more constraints than I expected (breaks #11161) so I just do it immediately now instead of generating everything and filtering afterwards. Even if it is not (strictly speaking) correct, we have the following: * Gives the "expected" warnings (the ones Ocaml or the previous algorithm would give) and, * Most importantly, it is safe. Unless a catch-all clause exists, a match against literals is always non-exhaustive. So, effectively this affects only what is shown to the user (and, evidently, performance!).
-
- 03 Dec, 2015 9 commits
-
-
Ben Gamari authored
To fix redundant patterns.
-
Ben Gamari authored
-
Ben Gamari authored
George's new exhaustiveness checker now realizes these are impossible. Yay!
-
Ben Gamari authored
Sadly we can't annotate the elements of a tuple
-
Ben Gamari authored
This reverts commit 8cba907a which broke `-ddump-to-file`.
-
Sergei Trofimovich authored
The error exibits as build failures of two types: 1. extending_ghc.rst:: ERROR: Anonymous hyperlink mismatch: 1 references but 0 targets. See "backrefs" attribute for IDs. 2. reading sources... [ 33%] glasgow_exts Exception occurred: pickle.dump(doctree, f, pickle.HIGHEST_PROTOCOL) RecursionError: maximum recursion depth exceeded while pickling an object Broken link created circular reference and failed to serialize the result. Fixed the problem by pointing to relevant section. Signed-off-by:
Sergei Trofimovich <siarheit@google.com>
-
Ben Gamari authored
-
Georgios Karachalias authored
This patch adresses several problems concerned with exhaustiveness and redundancy checking of pattern matching. The list of improvements includes: * Making the check type-aware (handles GADTs, Type Families, DataKinds, etc.). This fixes #4139, #3927, #8970 and other related tickets. * Making the check laziness-aware. Cases that are overlapped but affect evaluation are issued now with "Patterns have inaccessible right hand side". Additionally, "Patterns are overlapped" is now replaced by "Patterns are redundant". * Improved messages for literals. This addresses tickets #5724, #2204, etc. * Improved reasoning concerning cases where simple and overloaded patterns are matched (See #322). * Substantially improved reasoning for pattern guards. Addresses #3078. * OverloadedLists extension does not break exhaustiveness checking anymore (addresses #9951). Note that in general this cannot be handled but if we know that an argument has type '[a]', we treat it as a list since, the instance of 'IsList' gives the identity for both 'fromList' and 'toList'. If the type is not clear or is not the list type, then the check cannot do much still. I am a bit concerned about OverlappingInstances though, since one may override the '[a]' instance with e.g. an '[Int]' instance that is not the identity. * Improved reasoning for nested pattern matching (partial solution). Now we propagate type and (some) term constraints deeper when checking, so we can detect more inconsistencies. For example, this is needed for #4139. I am still not satisfied with several things but I would like to address at least the following before the next release: Term constraints are too many and not printed for non-exhaustive matches (with the exception of literals). This sometimes results in two identical (in appearance) uncovered warnings. Unless we actually show their difference, I would like to have a single warning.
-
Sergei Trofimovich authored
sphinx-1.3.1 found errors as: users_guide/glasgow_exts.rst:1799: WARNING: malformed hyperlink target. users_guide/glasgow_exts.rst:10638: WARNING: Inline interpreted text or phrase reference start-string without end-string. Signed-off-by:
Sergei Trofimovich <siarheit@google.com>
-
- 02 Dec, 2015 3 commits
-
-
Herbert Valerio Riedel authored
Differential Revision: https://phabricator.haskell.org/D1549
-
Ben Gamari authored
This is a pretty commonly needed module; Haddocks are worth the effort.
-
This patch creates empty dump file when GHC was run with `-ddump-rule-firings` (or `-ddump-rule-rewrites`) and `-ddump-to-file` specified, and there were no rules applied. If dump already exists it will be overwritten by empty one. Test Plan: ./validate Reviewers: austin, thomie, bgamari Reviewed By: thomie, bgamari Subscribers: thomie Projects: #ghc Differential Revision: https://phabricator.haskell.org/D1514 GHC Trac Issues: #10320
-