[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 9 commits: Fix #16593 by having only one definition of -fprint-explicit-runtime-reps

Marge Bot gitlab at gitlab.haskell.org
Fri May 3 00:44:10 UTC 2019



 Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
8182dbc0 by Chaitanya Koparkar at 2019-05-03T00:43:58Z
Fix #16593 by having only one definition of -fprint-explicit-runtime-reps

[skip ci]

- - - - -
9273fe37 by Sven Tennie at 2019-05-03T00:43:59Z
Typeset Big-O complexities with Tex-style notation (#16090)

Use `\min` instead of `min` to typeset it as an operator.

- - - - -
72926b0e by Shayne Fletcher at 2019-05-03T00:44:01Z
Make Extension derive Bounded

- - - - -
c2868b07 by Ben Gamari at 2019-05-03T00:44:01Z
testsuite: Mark concprog001 as fragile

Due to #16604.
- - - - -
fb92832c by Alp Mestanogullari at 2019-05-03T00:44:02Z
Hadrian: generate JUnit testsuite report in Linux CI job

We also keep it as an artifact, like we do for non-Hadrian jobs, and list it
as a junit report, so that the test results are reported in the GitLab UI for
merge requests.

- - - - -
eccded32 by Vladislav Zavialov at 2019-05-03T00:44:03Z
Pattern/expression ambiguity resolution

This patch removes 'EWildPat', 'EAsPat', 'EViewPat', and 'ELazyPat'
from 'HsExpr' by using the ambiguity resolution system introduced
earlier for the command/expression ambiguity.

Problem: there are places in the grammar where we do not know whether we
are parsing an expression or a pattern, for example:

	do { Con a b <- x } -- 'Con a b' is a pattern
	do { Con a b }      -- 'Con a b' is an expression

Until we encounter binding syntax (<-) we don't know whether to parse
'Con a b' as an expression or a pattern.

The old solution was to parse as HsExpr always, and rejig later:

	checkPattern :: LHsExpr GhcPs -> P (LPat GhcPs)

This meant polluting 'HsExpr' with pattern-related constructors. In
other words, limitations of the parser were affecting the AST, and all
other code (the renamer, the typechecker) had to deal with these extra
constructors.

We fix this abstraction leak by parsing into an overloaded
representation:

	class DisambECP b where ...
	newtype ECP = ECP { runECP_PV :: forall b. DisambECP b => PV (Located b) }

See Note [Ambiguous syntactic categories] for details.

Now the intricacies of parsing have no effect on the hsSyn AST when it
comes to the expression/pattern ambiguity.

- - - - -
e05cc559 by Ningning Xie at 2019-05-03T00:44:04Z
Only skip decls with CUSKs with PolyKinds on (fix #16609)

- - - - -
fb8cc5b0 by Ömer Sinan Ağacan at 2019-05-03T00:44:05Z
Fix interface version number printing in --show-iface

Before

    Version: Wanted [8, 0, 9, 0, 2, 0, 1, 9, 0, 4, 2, 5],
             got    [8, 0, 9, 0, 2, 0, 1, 9, 0, 4, 2, 5]

After

    Version: Wanted 809020190425,
             got    809020190425

- - - - -
672d3432 by Ryan Scott at 2019-05-03T00:44:07Z
Make equality constraints in kinds invisible

Issues #12102 and #15872 revealed something strange about the way GHC
handles equality constraints in kinds: it treats them as _visible_
arguments! This causes a litany of strange effects, from strange
error messages
(https://gitlab.haskell.org/ghc/ghc/issues/12102#note_169035)
to bizarre `Eq#`-related things leaking through to GHCi output, even
without any special flags enabled.

This patch is an attempt to contain some of this strangeness.
In particular:

* In `TcHsType.etaExpandAlgTyCon`, we propagate through the
  `AnonArgFlag`s of any `Anon` binders. Previously, we were always
  hard-coding them to `VisArg`, which meant that invisible binders
  (like those whose kinds were equality constraint) would mistakenly
  get flagged as visible.
* In `ToIface.toIfaceAppArgsX`, we previously assumed that the
  argument to a `FunTy` always corresponding to a `Required`
  argument. We now dispatch on the `FunTy`'s `AnonArgFlag` and map
  `VisArg` to `Required` and `InvisArg` to `Inferred`. As a
  consequence, the iface pretty-printer correctly recognizes that
  equality coercions are inferred arguments, and as a result,
  only displays them in `-fprint-explicit-kinds` is enabled.
* Speaking of iface pretty-printing, `Anon InvisArg` binders were
  previously being pretty-printed like `T (a :: b ~ c)`, as if they
  were required. This seemed inconsistent with other invisible
  arguments (that are printed like `T @{d}`), so I decided to switch
  this to `T @{a :: b ~ c}`.

Along the way, I also cleaned up a minor inaccuracy in the users'
guide section for constraints in kinds that was spotted in
https://gitlab.haskell.org/ghc/ghc/issues/12102#note_136220.

Fixes #12102 and #15872.

- - - - -


30 changed files:

- .gitlab-ci.yml
- compiler/deSugar/DsExpr.hs
- compiler/hieFile/HieAst.hs
- compiler/hsSyn/HsExpr.hs
- compiler/hsSyn/HsExtension.hs
- compiler/iface/BinIface.hs
- compiler/iface/IfaceType.hs
- compiler/iface/ToIface.hs
- compiler/parser/Lexer.x
- compiler/parser/Parser.y
- compiler/parser/RdrHsSyn.hs
- compiler/rename/RnExpr.hs
- compiler/typecheck/TcHsType.hs
- compiler/typecheck/TcRnTypes.hs
- compiler/typecheck/TcTyClsDecls.hs
- compiler/types/TyCon.hs
- docs/users_guide/glasgow_exts.rst
- docs/users_guide/using.rst
- libraries/base/Data/OldList.hs
- libraries/base/GHC/List.hs
- libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs
- testsuite/tests/concurrent/prog001/all.T
- + testsuite/tests/ghci/scripts/T15872.hs
- + testsuite/tests/ghci/scripts/T15872.script
- + testsuite/tests/ghci/scripts/T15872.stdout
- testsuite/tests/ghci/scripts/all.T
- testsuite/tests/parser/should_fail/InfixAppPatErr.stderr
- testsuite/tests/parser/should_fail/T984.stderr
- testsuite/tests/parser/should_fail/all.T
- + testsuite/tests/parser/should_fail/cmdFail001.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/b3efbe66be1e4df7b6a0b35c692ed36e080189d0...672d3432b8ca4d1a2b7ce65fe263dab207d43543

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/b3efbe66be1e4df7b6a0b35c692ed36e080189d0...672d3432b8ca4d1a2b7ce65fe263dab207d43543
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190502/77f5eed8/attachment-0001.html>


More information about the ghc-commits mailing list