[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 6 commits: Implement the -XUnliftedNewtypes extension.
Marge Bot
gitlab at gitlab.haskell.org
Fri Jun 14 17:20:01 UTC 2019
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
effdd948 by Andrew Martin at 2019-06-14T14:48:13Z
Implement the -XUnliftedNewtypes extension.
GHC Proposal: 0013-unlifted-newtypes.rst
Discussion: https://github.com/ghc-proposals/ghc-proposals/pull/98
Issues: #15219, #1311, #13595, #15883
Implementation Details:
Note [Implementation of UnliftedNewtypes]
Note [Unifying data family kinds]
Note [Compulsory newtype unfolding]
This patch introduces the -XUnliftedNewtypes extension. When this
extension is enabled, GHC drops the restriction that the field in
a newtype must be of kind (TYPE 'LiftedRep). This allows types
like Int# and ByteArray# to be used in a newtype. Additionally,
coerce is made levity-polymorphic so that it can be used with
newtypes over unlifted types.
The bulk of the changes are in TcTyClsDecls.hs. With -XUnliftedNewtypes,
getInitialKind is more liberal, introducing a unification variable to
return the kind (TYPE r0) rather than just returning (TYPE 'LiftedRep).
When kind-checking a data constructor with kcConDecl, we attempt to
unify the kind of a newtype with the kind of its field's type. When
typechecking a data declaration with tcTyClDecl, we again perform a
unification. See the implementation note for more on this.
Co-authored-by: Richard Eisenberg <rae at richarde.dev>
- - - - -
5279dda8 by Ben Gamari at 2019-06-14T14:48:51Z
PrelRules: Don't break let/app invariant in shiftRule
Previously shiftRule would rewrite as invalid shift like
```
let x = I# (uncheckedIShiftL# n 80)
in ...
```
to
```
let x = I# (error "invalid shift")
in ...
```
However, this breaks the let/app invariant as `error` is not
okay-for-speculation. There isn't an easy way to avoid this so let's not
try. Instead we just take advantage of the undefined nature of invalid
shifts and return zero.
Fixes #16742.
- - - - -
83c8abe2 by Ben Gamari at 2019-06-14T17:19:56Z
gitlab-ci: Lint testsuite for framework failures
This introduces a new lint job checking for framework failures and
listing broken tests.
- - - - -
f391d744 by Ben Gamari at 2019-06-14T17:19:56Z
lint: Only apply --interactive lint to testsuite .T files
- - - - -
073e4750 by Ben Gamari at 2019-06-14T17:19:56Z
gitlab-ci: Lint the linters
- - - - -
5d880cd8 by Alp Mestanogullari at 2019-06-14T17:19:58Z
Remove duplicates from 'ghc --info' output
- - - - -
30 changed files:
- .gitlab-ci.yml
- .gitlab/linters/check-makefiles.py
- .gitlab/linters/linter.py
- compiler/basicTypes/Id.hs
- compiler/basicTypes/MkId.hs
- compiler/codeGen/StgCmmForeign.hs
- compiler/coreSyn/CoreSyn.hs
- compiler/deSugar/DsExpr.hs
- compiler/hsSyn/HsTypes.hs
- compiler/main/DynFlags.hs
- compiler/main/TidyPgm.hs
- compiler/prelude/PrelRules.hs
- compiler/prelude/PrimOp.hs
- compiler/prelude/TysPrim.hs
- compiler/prelude/primops.txt.pp
- compiler/rename/RnSource.hs
- compiler/typecheck/TcErrors.hs
- compiler/typecheck/TcEvidence.hs
- compiler/typecheck/TcHsType.hs
- compiler/typecheck/TcInstDcls.hs
- compiler/typecheck/TcMType.hs
- compiler/typecheck/TcSimplify.hs
- compiler/typecheck/TcTyClsDecls.hs
- compiler/typecheck/TcTypeable.hs
- compiler/types/Coercion.hs
- compiler/types/Type.hs
- docs/users_guide/8.10.1-notes.rst
- docs/users_guide/glasgow_exts.rst
- libraries/base/Control/Category.hs
- libraries/base/Data/Coerce.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/8a27fd4d2b531df1dce7778773ba0e7900d77ad3...5d880cd86324751f435348c8a48573c2e177cf85
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/8a27fd4d2b531df1dce7778773ba0e7900d77ad3...5d880cd86324751f435348c8a48573c2e177cf85
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/20190614/3d27678b/attachment.html>
More information about the ghc-commits
mailing list