[Git][ghc/ghc][wip/parser-validator] 26 commits: Hadrian: fix the value we pass to the test driver for config.compiler_debugged

Vladislav Zavialov gitlab at gitlab.haskell.org
Tue Apr 23 10:43:00 UTC 2019



Vladislav Zavialov pushed to branch wip/parser-validator at Glasgow Haskell Compiler / GHC


Commits:
5988f17a by Alp Mestanogullari at 2019-04-19T02:46:12Z
Hadrian: fix the value we pass to the test driver for config.compiler_debugged

We used to pass YES/NO, while that particular field is set to True/False. This
happens to fix an unexpected pass, T9208.

- - - - -
57cf1133 by Alec Theriault at 2019-04-19T02:52:25Z
TH: make `Lift` and `TExp` levity-polymorphic

Besides the obvious benefits of being able to manipulate `TExp`'s of
unboxed types, this also simplified `-XDeriveLift` all while making
it more capable.

  * `ghc-prim` is explicitly depended upon by `template-haskell`

  * The following TH things are parametrized over `RuntimeRep`:

      - `TExp(..)`
      - `unTypeQ`
      - `unsafeTExpCoerce`
      - `Lift(..)`

  * The following instances have been added to `Lift`:

      - `Int#`, `Word#`, `Float#`, `Double#`, `Char#`, `Addr#`
      - unboxed tuples of lifted types up to arity 7
      - unboxed sums of lifted types up to arity 7

    Ideally we would have levity-polymorphic _instances_ of unboxed
    tuples and sums.

  * The code generated by `-XDeriveLift` uses expression quotes
    instead of generating large amounts of TH code and having
    special hard-coded cases for some unboxed types.

- - - - -
fdfd9731 by Alec Theriault at 2019-04-19T02:52:25Z
Add test case for #16384

Now that `TExp` accepts unlifted types, #16384 is fixed. Since the real
issue there was GHC letting through an ill-kinded type which
`-dcore-lint` rightly rejected, a reasonable regression test is that
the program from #16384 can now be accepted without `-dcore-lint`
complaining.

- - - - -
eb2a4df8 by Michal Terepeta at 2019-04-20T03:32:08Z
StgCmmPrim: remove an unnecessary instruction in doNewArrayOp

Previously we would generate a local variable pointing after the array
header and use it to initialize the array elements. But we already use
stores with offset, so it's easy to just add the header to those offsets
during compilation and avoid generating the local variable (which would
become a LEA instruction when using native codegen; LLVM already
optimizes it away).

Signed-off-by: Michal Terepeta <michal.terepeta at gmail.com>

- - - - -
fcef26b6 by klebinger.andreas at gmx.at at 2019-04-20T03:38:16Z
Don't indent single alternative case expressions for STG.

Makes the width of STG dumps slightly saner.
Especially for things like unboxing.

Fixes #16580

- - - - -
e7280c93 by Vladislav Zavialov at 2019-04-20T03:44:24Z
Tagless final encoding of ExpCmdI in the parser

Before this change, we used a roundabout encoding:

1. a GADT (ExpCmdG)
2. a class to pass it around (ExpCmdI)
3. helpers to match on it (ecHsApp, ecHsIf, ecHsCase, ...)

It is more straightforward to turn these helpers into class methods,
removing the need for a GADT.

- - - - -
99dd5d6b by Alec Theriault at 2019-04-20T03:50:29Z
Haddock: support strict GADT args with docs

Rather than massaging the output of the parser to re-arrange docs and
bangs, it is simpler to patch the two places in which the strictness
info is needed (to accept that the `HsBangTy` may be inside an
`HsDocTy`).

Fixes #16585.

- - - - -
10776562 by Andrey Mokhov at 2019-04-20T03:56:38Z
Hadrian: Drop old/unused CI scripts

- - - - -
37b1a6da by Ben Gamari at 2019-04-20T15:55:20Z
gitlab-ci: Improve error message on failure of doc-tarball job

Previously the failure was quite nondescript.

- - - - -
e3fe2601 by Ben Gamari at 2019-04-20T15:55:35Z
gitlab-ci: Allow doc-tarball job to fail

Due to allowed failure of Windows job.

- - - - -
bd3872df by Ben Gamari at 2019-04-20T15:55:38Z
gitlab-ci: Only run release notes lint on release tags

- - - - -
2145b738 by Ben Gamari at 2019-04-20T15:55:38Z
gitlab-ci: Add centos7 release job

- - - - -
983c53c3 by Ben Gamari at 2019-04-20T15:55:38Z
gitlab-ci: Do not build profiled libraries on 32-bit Windows

Due to #15934.

- - - - -
5cf771f3 by Ben Gamari at 2019-04-21T13:07:13Z
users-guide: Add pretty to package list

- - - - -
6ac5da78 by Ben Gamari at 2019-04-21T13:07:13Z
users-guide: Add libraries section to 8.10.1 release notes

- - - - -
3e963de3 by Andrew Martin at 2019-04-21T13:13:20Z
improve docs for casArray and casSmallArray

- - - - -
98bffb07 by Andrew Martin at 2019-04-21T13:13:20Z
[skip ci] say "machine words" instead of "Int units" in the primops docs

- - - - -
3aefc14a by Andrew Martin at 2019-04-21T13:13:20Z
[skip ci] correct formatting of casArray# in docs for casSmallArray#

- - - - -
0e96d120 by Andrew Martin at 2019-04-21T13:13:20Z
[skip ci] correct the docs for casArray a little more. clarify that the returned element may be two different things

- - - - -
687152f2 by Artem Pyanykh at 2019-04-21T13:19:29Z
testsuite: move tests related to linker under tests/rts/linker

- - - - -
36e51406 by Artem Pyanykh at 2019-04-21T13:19:29Z
testsuite: fix ifdef lint errors under tests/rts/linker

- - - - -
1a7a329b by Matthew Pickering at 2019-04-22T18:37:30Z
Correct off by one error in ghci +c

Fixes #16569

- - - - -
51655fd8 by Alp Mestanogullari at 2019-04-22T18:44:11Z
Hadrian: use the testsuite driver's config.haddock arg more correctly

4 haddock tests assume that .haddock files have been produced, by using the
'req_haddock' modifier. The testsuite driver assumes that this condition is
satisfied if 'config.haddock' is non-empty, but before this patch Hadrian was
always passing the path to where the haddock executable should be, regardless
of whether it is actually there or not.

Instead, we now pass an empty config.haddock when we can't find all of
<build root>/docs/html/libraries/<pkg>/<pkg>.haddock>, where <pkg> ranges over
array, base, ghc-prim, process and template-haskell, and pass the path
to haddock when all those file exists. This has the (desired) effect of skipping
the 4 tests (marked as 'missing library') when the docs haven't been built,
and running the haddock tests when they have.

- - - - -
1959bad3 by Vladislav Zavialov at 2019-04-22T18:50:18Z
Stop misusing EWildPat in pattern match coverage checking

EWildPat is a constructor of HsExpr used in the parser to represent
wildcards in ambiguous positions:

* in expression context, EWildPat is turned into hsHoleExpr (see rnExpr)
* in pattern context, EWildPat is turned into WildPat (see checkPattern)

Since EWildPat exists solely for the needs of the parser, we could
remove it by improving the parser.

However, EWildPat has also been used for a different purpose since
8a50610: to represent patterns that the coverage checker cannot handle.
Not only this is a misuse of EWildPat, it also stymies the removal of
EWildPat.

- - - - -
a0f439af by Vladislav Zavialov at 2019-04-23T10:38:29Z
Introduce MonadP, make PV a newtype

Previously we defined   type PV = P,
this had the downside that if we wanted to change PV,
we would have to modify P as well.

Now PV is free to evolve independently from P.

The common operations addError, addFatalError, getBit, addAnnsAt,
were abstracted into a class called MonadP.

- - - - -
da4067cc by Vladislav Zavialov at 2019-04-23T10:38:29Z
checkPattern error hint is PV context

There is a hint added to error messages reported in checkPattern.
Instead of passing it manually, we put it in a ReaderT environment inside PV.

- - - - -


30 changed files:

- .gitlab-ci.yml
- compiler/codeGen/StgCmmPrim.hs
- compiler/deSugar/Check.hs
- compiler/hsSyn/HsTypes.hs
- compiler/parser/Lexer.x
- compiler/parser/Parser.y
- compiler/parser/RdrHsSyn.hs
- compiler/prelude/THNames.hs
- compiler/prelude/primops.txt.pp
- compiler/stgSyn/StgSyn.hs
- compiler/typecheck/Inst.hs
- compiler/typecheck/TcDeriv.hs
- compiler/typecheck/TcDerivUtils.hs
- compiler/typecheck/TcExpr.hs
- compiler/typecheck/TcGenDeriv.hs
- compiler/typecheck/TcSplice.hs
- docs/users_guide/8.10.1-notes.rst
- docs/users_guide/8.8.1-notes.rst
- docs/users_guide/glasgow_exts.rst
- ghc/GHCi/UI.hs
- ghc/GHCi/UI/Info.hs
- − hadrian/.travis.yml
- − hadrian/appveyor.yml
- − hadrian/circle.yml
- hadrian/src/Settings/Builders/RunTest.hs
- libraries/template-haskell/Language/Haskell/TH/Syntax.hs
- libraries/template-haskell/changelog.md
- libraries/template-haskell/template-haskell.cabal.in
- testsuite/tests/deriving/should_compile/T14682.stderr
- testsuite/tests/deriving/should_compile/drv-empty-data.stderr


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/3fe6ffd3d62778653481192a009d98ce791dc232...da4067cc2e26dd08ea2bdee5c25119e9638240c6

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/3fe6ffd3d62778653481192a009d98ce791dc232...da4067cc2e26dd08ea2bdee5c25119e9638240c6
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/20190423/073257a1/attachment.html>


More information about the ghc-commits mailing list