- 07 Dec, 2015 11 commits
-
-
Alan Zimmerman authored
The ConDecl type in HsDecls is an uneasy compromise. For the most part, HsSyn directly reflects the syntax written by the programmer; and that gives just the right "pegs" on which to hang Alan's API annotations. But ConDecl doesn't properly reflect the syntax of Haskell-98 and GADT-style data type declarations. To be concrete, here's a draft new data type ```lang=hs data ConDecl name | ConDeclGADT { con_names :: [Located name] , con_type :: LHsSigType name -- The type after the ‘::’ , con_doc :: Maybe LHsDocString } | ConDeclH98 { con_name :: Located name , con_qvars :: Maybe (LHsQTyVars name) -- User-written forall (if any), and its implicit -- kind variables -- Non-Nothing needs -XExistentialQuantification , con_cxt :: Maybe (LHsContext name) -- ^ User-written context (if any) , con_details :: HsConDeclDetails name -- ^ Arguments , con_doc :: Maybe LHsDocString -- ^ A possible Haddock comment. } deriving (Typeable) ``` Note that For GADTs, just keep a type. That's what the user writes. NB:HsType can represent records on the LHS of an arrow: { x:Int,y:Bool} -> T con_qvars and con_cxt are both Maybe because they are both optional (the forall and the context of an existential data type For ConDeclGADT the type variables of the data type do not scope over the con_type; whereas for ConDeclH98 they do scope over con_cxt and con_details. Updates haddock submodule. Test Plan: ./validate Reviewers: simonpj, erikd, hvr, goldfire, austin, bgamari Subscribers: erikd, goldfire, thomie, mpickering Differential Revision: https://phabricator.haskell.org/D1558 GHC Trac Issues: #11028
-
Ryan Scott authored
Test Plan: Validate. Reviewers: simonpj, goldfire, hvr, dreixel, kosmikus, austin, bgamari Reviewed By: kosmikus, austin, bgamari Subscribers: RyanGlScott, Fuuzetsu, bgamari, thomie, carter, dreixel Differential Revision: https://phabricator.haskell.org/D493 GHC Trac Issues: #9766
-
Ben Gamari authored
Test Plan: Validate Reviewers: austin, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1569
-
roshats authored
Reviewers: austin, thomie, bgamari Reviewed By: thomie, bgamari Subscribers: mpickering, thomie Differential Revision: https://phabricator.haskell.org/D1518 GHC Trac Issues: #9015
-
Ben Gamari authored
-
kanetw authored
Whenever a data instance is exported, the corresponding data family is exported, too. This allows one to write ``` -- Foo.hs module Foo where data family T a -- Bar.hs module Bar where import Foo data instance T Int = MkT -- Baz.hs module Baz where import Bar (T(MkT)) ``` In previous versions of GHC, this required a workaround explicit export list in `Bar`. Reviewers: bgamari, goldfire, austin Reviewed By: bgamari, goldfire Subscribers: goldfire, thomie Differential Revision: https://phabricator.haskell.org/D1573 GHC Trac Issues: #11164
-
Sibi Prabakaran authored
The behavior is changed to this: ``` ghc-pkg list blahblah /home/sibi/ghc/inplace/lib/package.conf.d (no packages) ``` instead of: ``` ghc-pkg list blahblah /home/sibi/ghc/inplace/lib/package.conf.d ``` Reviewers: austin, thomie, bgamari Reviewed By: thomie, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1575 GHC Trac Issues: #6119
-
Ryan Scott authored
Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1577
-
Ryan Scott authored
Reviewers: hvr, austin, goldfire, bgamari Reviewed By: goldfire, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1578
-
Ben Gamari authored
-
Jan Stolarek authored
Hoopl changes required to implement #10982
-
- 06 Dec, 2015 3 commits
-
-
Herbert Valerio Riedel authored
This makes sure that `AC_USE_SYSTEM_EXTENSIONS` (which implies `AC_PROG_CC`) is called after the `AC_ARG_WITH([cc],,)` invocation, so that the proper CC setting is in scope. Otherwise this can break cross-compilation. This also needs to pull in a submodule update for `unix` This is a follow-up commit to 7af29da0 which hopefully fixes #11168
-
Herbert Valerio Riedel authored
This is similiar to the `-fwarn-noncanonical-monad-instances` warning implemented via #11128, but applies to `Semigroup`/`Monoid` instead and the `(<>)`/`mappend` methods (of which `mappend` is planned to move out of `Monoid` at some point in the future being redundant and thus error-prone). This warning is contained in `-Wcompat` but not in `-Wall`. This addresses #11150 Reviewed By: quchen Differential Revision: https://phabricator.haskell.org/D1553
-
Herbert Valerio Riedel authored
This fixes `for`-loops introduced via 64761ce9 which can result in `for i in ;` which some `/bin/sh` implementations don't like.
-
- 05 Dec, 2015 10 commits
-
-
Herbert Valerio Riedel authored
On some OSes such as AIX `MEM_NORESERVE` is not available. Since this feature is only needed when the new two-step allocator (see #9706) is enabled we can simply turn this into a runtime error to avoid a larger refactoring of this already quite platform-sensitive code. Reviewed By: bgamari, ezyang Differential Revision: https://phabricator.haskell.org/D1568
-
Sergei Trofimovich authored
The problem: $ make <watch sphinx rebuilds docs> # no changes in sources $ make <watch sphinx rebuilds docs again> The problem was due to wrong assumption about what files exactly are generated by mkUserGuidePart. Build system expected the following files to be created: docs/man/all-flags.gen.rst flags-recompilating-checking.gen.rst but mkUserGuidePart generated: docs/users_guide/all-flags.gen.rst flags-recompilation-checking.gen.rst Signed-off-by:
Sergei Trofimovich <siarheit@google.com>
-
Sergei Trofimovich authored
When building 'html' and 'man' manuals build system reports mkUserGuide is ran more than once (up to 3 times in parallel). See Note [Blessed make target file] for more details. Signed-off-by:
Sergei Trofimovich <siarheit@google.com>
-
Sergei Trofimovich authored
Signed-off-by:
Sergei Trofimovich <siarheit@google.com>
-
Herbert Valerio Riedel authored
This makes use of the new facility introduced via 14d0f7f1 which allows to have certain flags passed only to the non-bootstrapping GHC. This is needed because sometimes we can't assume the existence of a certain flag in the bootstrapping compiler which was only added recently to GHC HEAD. This also updates the haddock submodule to fix a few remaining noncanonical instance definitions. Differential Revision: https://phabricator.haskell.org/D1571
-
Herbert Valerio Riedel authored
This temporarily disables the external json linters introduced via 020375d1 and 901cab10. The new linters break the differential validation in Harbormaster because the submodules are not cloned early enough (i.e. before `arc` is called by the script).
-
Herbert Valerio Riedel authored
It shouldn't have been possible to reference an external Git submodule not hosted on git.haskell.org as we can't otherwise ensure gitlink integrity. But it turns out the validation hook scripts in place didn't reject 020375d1, so here we are... This commit changes ghc.git to use our own fork/copy of https://github.com/bgamari/arcanist-external-json-linter hosted on git.haskell.org
-
kanetw authored
Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D1574
-
Georgios Karachalias authored
-
Georgios Karachalias authored
-
- 04 Dec, 2015 16 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.
-
Ben Gamari authored
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
-