| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements GHC Proposal #54: .../ghc-proposals/blob/master/proposals/0054-kind-signatures.rst
With this patch, a type constructor can now be given an explicit
standalone kind signature:
{-# LANGUAGE StandaloneKindSignatures #-}
type Functor :: (Type -> Type) -> Constraint
class Functor f where
fmap :: (a -> b) -> f a -> f b
This is a replacement for CUSKs (complete user-specified
kind signatures), which are now scheduled for deprecation.
User-facing changes
-------------------
* A new extension flag has been added, -XStandaloneKindSignatures, which
implies -XNoCUSKs.
* There is a new syntactic construct, a standalone kind signature:
type <name> :: <kind>
Declarations of data types, classes, data families, type families, and
type synonyms may be accompanied by a standalone kind signature.
* A standalone kind signature enables polymorphic recursion in types,
just like a function type signature enables polymorphic recursion in
terms. This obviates the need for CUSKs.
* TemplateHaskell AST has been extended with 'KiSigD' to represent
standalone kind signatures.
* GHCi :info command now prints the kind signature of type constructors:
ghci> :info Functor
type Functor :: (Type -> Type) -> Constraint
...
Limitations
-----------
* 'forall'-bound type variables of a standalone kind signature do not
scope over the declaration body, even if the -XScopedTypeVariables is
enabled. See #16635 and #16734.
* Wildcards are not allowed in standalone kind signatures, as partial
signatures do not allow for polymorphic recursion.
* Associated types may not be given an explicit standalone kind
signature. Instead, they are assumed to have a CUSK if the parent class
has a standalone kind signature and regardless of the -XCUSKs flag.
* Standalone kind signatures do not support multiple names at the moment:
type T1, T2 :: Type -> Type -- rejected
type T1 = Maybe
type T2 = Either String
See #16754.
* Creative use of equality constraints in standalone kind signatures may
lead to GHC panics:
type C :: forall (a :: Type) -> a ~ Int => Constraint
class C a where
f :: C a => a -> Int
See #16758.
Implementation notes
--------------------
* The heart of this patch is the 'kcDeclHeader' function, which is used to
kind-check a declaration header against its standalone kind signature.
It does so in two rounds:
1. check user-written binders
2. instantiate invisible binders a la 'checkExpectedKind'
* 'kcTyClGroup' now partitions declarations into declarations with a
standalone kind signature or a CUSK (kinded_decls) and declarations
without either (kindless_decls):
* 'kinded_decls' are kind-checked with 'checkInitialKinds'
* 'kindless_decls' are kind-checked with 'getInitialKinds'
* DerivInfo has been extended with a new field:
di_scoped_tvs :: ![(Name,TyVar)]
These variables must be added to the context in case the deriving clause
references tcTyConScopedTyVars. See #16731.
|
| |
|
| |
|
|
|
|
|
|
| |
As per https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail
Coauthored-by: Ben Gamari <ben@well-typed.com>
|
|
|
|
| |
See #16386.
|
|
|
|
|
|
|
|
|
| |
Prevents some tests from failing just due to mismatched version numbers.
These version numbers shouldn't cause tests to fail, especially since
we *expect* them to be regularly incremented. The motivation for this
particular set of changes came from the changes that came along with
the `base` version bump in 8f19ecc95fbaf2cc977531d721085d8441dc09b7.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, our test did something like this:
1. Typecheck p
2. Typecheck q (which made use of an instantiated p)
3. Build instantiated p
4. Build instantiated q
Cabal previously permitted this, under the reasoning that during
typechecking there's no harm in using the instantiated p even if we
haven't build it yet; we'll just instantiate it on the fly with p.
However, this is not true! If q makes use of a Template Haskell
splice from p, we absolutely must have built the instantiated p
before we typecheck q, since this typechecking will need to
run some splices. Cabal now complains that you haven't done
it correctly, which we indeed have not!
Reordering so that we do this:
1. Typecheck p
3. Build instantiated p
2. Typecheck q (which made use of an instantiated p)
4. Build instantiated q
Fixes the problem. If Cabal had managed the ordering itself, it would
have gotten it right.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It should work to write an indefinite package using TemplateHaskell,
so long as all of the actual TH code lives outside of the package.
However, cleverness we had to build TH code even when building
with -fno-code meant that we attempted to build object code for
modules in an indefinite package, even when the signatures were
not instantiated. This patch disables said logic in the event
that an indefinite package is being typechecked.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Test Plan: validate
Reviewers: simonpj, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, carter
GHC Trac Issues: #16219
Differential Revision: https://phabricator.haskell.org/D5475
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
For holes, its necessary to "see through" the instantiation
of the hole to get accurate family instance dependencies.
For example, if B imports <A>, and <A> is instantiated with
F, we must grab and include all of the dep_finsts from
F to have an accurate transitive dep_finsts list.
However, we MUST NOT do this for regular modules.
First, for efficiency reasons, doing this
bloats the the dep_finsts list, because we *already* had
those modules in the list (it wasn't a hole module, after
all). But there's a second, more important correctness
consideration: we perform module renaming when running
--abi-hash. In this case, GHC's contract to the user is that
it will NOT go and read out interfaces of any dependencies
(https://github.com/haskell/cabal/issues/3633); the point of
--abi-hash is just to get a hash of the on-disk interfaces
for this *specific* package. If we go off and tug on the
interface for /everything/ in dep_finsts, we're gonna have a
bad time. (It's safe to do do this for hole modules, though,
because the hmap for --abi-hash is always trivial, so the
interface we request is local. Though, maybe we ought
not to do it in this case either...)
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Test Plan: validate
Reviewers: alexbiehl, goldfire, bgamari
Subscribers: ppk, shlevy, rwbarton, carter
GHC Trac Issues: #15594
Differential Revision: https://phabricator.haskell.org/D5123
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit allows backpack signatures to enforce constraints like
KnownNat
on data types. Thus it fixes #15379. There were two important
differences in the
way GHC used to handle classes like KnowNat
1. Hand crafted instances of `KnownNat` were forbidden, and
2. The dictionary for an instance `KnownNat T` was generated on the
fly.
For supporting backpack both these points have to be revisited.
Disallowing instances of KnownNat
--------------------------------------------
Users were disallowed to declare instances of certain builtin classes
like KnownNat for obvious safety reasons --- when we use the
constraint like `KnownNat T`, we want T to be associated to a natural
number. However, due to the reuse of this code while processing backpack
signatures, `instance KnownNat T` were being disallowed even in module
signature files.
There is an important difference when it comes to instance declarations
in a signature file. Consider the signature `Abstract` given below
```
signature Abstract where
data T :: Nat
instance KnownNat T
```
Inside a signature like `Abstract`, the `instance Known T` is not really
creating an instance but rather demanding any module that implements
this signature to enforce the constraint `KnownNat` on its type
T. While hand crafted KnownNat instances continued to be prohibited in
modules,
this commit ensures that it is not forbidden while handling signatures.
Resolving Dictionaries
----------------------------
Normally GHC expects any instance `T` of class `KnownNat` to eventually
resolve
to an integer and hence used to generate the evidence/dictionary for
such instances
on the fly as in when it is required. However, when backpack module and
signatures are involved
It is not always possible to resolve the type to a concrete integer
utill the mixin stage. To illustrate
consider again the signature `Abstract`
> signature Abstract where
> data T :: Nat
> instance KnownNat T
and a module `Util` that depends on it:
> module Util where
> import Abstract
> printT :: IO ()
> printT = do print $ natVal (Proxy :: Proxy T)
Clearly, we need to "use" the dictionary associated with `KnownNat T`
in the module `Util`, but it is too early for the compiler to produce
a real dictionary as we still have not fixed what `T` is. Only when we
mixin a concrete module
> module Concrete where
> type T = 42
do we really get hold of the underlying integer.
In this commit, we make the following changes in the resolution of
instance dictionary
for constraints like `KnownNat T`
1. If T is indeed available as a type alias for an integer constant,
generate the dictionary on the fly as before, failing which
2. Do not give up as before but look up the type class environment for
the evidence.
This was enough to make the resolution of `KnownNat` dictionaries work
in the setting of Backpack as
when actual code is generated, the signature Abstract (due to the
`import Abstract` ) in `Util` gets
replaced by an actual module like Concrete, and resolution happens as
before.
Everything that we said for `KnownNat` is applicable for `KnownSymbol`
as well.
Reviewers: bgamari, ezyang, goldfire, simonpj
Reviewed By: simonpj
Subscribers: simonpj, ezyang, rwbarton, thomie, carter
GHC Trac Issues: #15379
Differential Revision: https://phabricator.haskell.org/D4988
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Those tests are currently making our i386 validation fail on CircleCI:
https://circleci.com/gh/ghc/ghc/8827
Test Plan: Using my Phab<->CircleCI bridge to run i386 validation for this diff.
Reviewers: bgamari, monoidal
Reviewed By: monoidal
Subscribers: rwbarton, carter
GHC Trac Issues: #15484, #15383
Differential Revision: https://phabricator.haskell.org/D5103
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backpack is unable to type check signatures that expect a data which
is a type level literal. This was reported in issue #15138. These
commits are a fix for this. It also includes a minimal test case that
was mentioned in the issue.
Reviewers: bgamari, ezyang, goldfire
Reviewed By: bgamari, ezyang
Subscribers: simonpj, ezyang, rwbarton, thomie, carter
GHC Trac Issues: #15138
Differential Revision: https://phabricator.haskell.org/D4951
|
|
|
|
|
|
| |
Several tests were failing in DEBUG mode, but fixing this
was easy: just pass $(TEST_HC_OPTS) in the relevant
Makefiles.
|
|
|
|
| |
Bumps containers submodule, among others.
|
|
|
|
|
|
|
|
| |
This reverts commit 50e7bff7514ebbd74976c1a9fa0db7a8275178ae.
Reverts submodule changes.
Sigh, the haskeline commit isn't quite upstream yet.
|
|
|
|
| |
Bumps containers submodule, among others.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Another round and attempt at getting these down to 0.
We really should re-enable the CI and not wait for those cloud based ones.
I've disabled the backpack tests on windows as they are too broad, they test
as much the shell as they do the compiler.
The perf tests have been too long to track down. but the numbers are horrible
but I don't see them getting fixed so just have to accept them.
T9293 has new windows specific output because a Dyn way only flag was added.
This will of course not work on non-Dyn way builds.
Test Plan: ./validate
Reviewers: bgamari, hvr, simonmar
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #15107
Differential Revision: https://phabricator.haskell.org/D4668
|
|
|
|
|
|
| |
This reverts commit 1cdc14f9c014f1a520638f7c0a01799ac6d104e6.
This is causing non-deterministic testsuite output.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See `Note [Recompute abi-depends]` for more information.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Test Plan: `./validate`
Reviewers: bgamari, ezyang
Reviewed By: bgamari
Subscribers: tdammers, juhp, carter, alexbiehl, shlevy, cocreature,
rwbarton, thomie
GHC Trac Issues: #14381
Differential Revision: https://phabricator.haskell.org/D4159
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
unpackClosure#'s behavior and type has changed. This caused a CPP guard
in the new ghc-heap package to fail when bootstrapping with GHC 8.4.
Test Plan: Validate bootstrapping with GHC 8.4
Reviewers: RyanGlScott
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4716
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is mostly for congruence with 'subWordC#' and '{add,sub}IntC#'.
I found 'plusWord2#' while implementing this, which both lacks
documentation and has a slightly different specification than
'addWordC#', which means the generic implementation is unnecessarily
complex.
While I was at it, I also added lacking meta-information on PrimOps
and refactored 'subWordC#'s generic implementation to be branchless.
Reviewers: bgamari, simonmar, jrtc27, dfeuer
Reviewed By: bgamari, dfeuer
Subscribers: dfeuer, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4592
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Bumps several submodules.
Test Plan: ./validate
Reviewers: hvr, bgamari
Reviewed By: bgamari
Subscribers: thomie, carter
GHC Trac Issues: #15018
Differential Revision: https://phabricator.haskell.org/D4609
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This takes care of bumping the `base` and `integer-gmp`
minor version numbers in anticipation of a GHC 8.4.2 release.
While I was in town, I also filled in a `@since TODO` Haddock
annotation for `powModSecInteger` in `integer-gmp` with
`1.0.2.0`, and updated the changelog accordingly.
Test Plan: ./validate
Reviewers: hvr, goldfire, bgamari
Reviewed By: bgamari
Subscribers: thomie, carter
GHC Trac Issues: #15025
Differential Revision: https://phabricator.haskell.org/D4586
|
|
|
|
|
|
|
|
| |
Reviewers: bgamari
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4340
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Cabal-2.2 uses SPDX license identifiers, so I had to update
`cabal-version: 2.1` packages `license: BSD3` to `license: BSD-3-Clause`
- `ghc-cabal` used old ReadP parsec, now it uses `parsec` too
- InstalledPackageInfo pretty-printing have changed a little,
fields with default values aren't printed. This can be changed in
`Cabal` still, but I haven't found problems with omitting them.
Note: `BSD-3-Clause` is parsed as "name = BSD, version = 3" by old
parser (because 3-Clause looks like version 3 with tag Clause).
If you see *"BSD-3" is not a valid license*, then something is using
old parser still.
Fixes #9885.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes the testsuite pass clean on Windows again.
It also fixes the `libstdc++-6.dll` error harbormaster
was showing.
I'm marking some tests as isolated tests to reduce their
flakiness (mostly concurrency tests) when the test system
is under heavy load.
Updates process submodule.
Test Plan: ./validate
Reviewers: hvr, bgamari, erikd, simonmar
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4277
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Previously, we attempted to lookup 'hole' packages for
include directories; this obviously is not going to work.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Test Plan: validate
Reviewers: ekmett, bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #14525
Differential Revision: https://phabricator.haskell.org/D4234
|
|
|
|
|
|
| |
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4241
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: validate
Reviewers: ekmett, austin, bgamari
Reviewed By: bgamari
Subscribers: duog, goldfire, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D4155
|
|
|
|
|
|
|
| |
This is prompted by the addition of `compareByteArrays#` in
e3ba26f8b49700b41ff4672f3f7f6a4e453acdcc
NOTE: We may switch to synchronise `ghc-prim` with GHC's version at some point
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes it possible to specify non * kinds of
abstract data types in signatures, so you can have
levity polymorphism through Backpack, without the runtime
representation constraint!
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: andrewthad, bgamari, austin, goldfire
Reviewed By: bgamari
Subscribers: goldfire, rwbarton, thomie
GHC Trac Issues: #13955
Differential Revision: https://phabricator.haskell.org/D3825
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes the issue reported at https://github.com/haskell/cabal/issues/4755
and fixes #14304 in the GHC tracker.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: bgamari, austin, goldfire
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #14304
Differential Revision: https://phabricator.haskell.org/D4057
|
|
|
|
|
|
|
|
|
|
| |
Bumps numerous submodules.
Reviewers: austin, hvr
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3974
|
|
|
|
| |
(cherry picked from commit 8c5405f63c2de0c445ec171aab63c35786544b9e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Triggered by the changes in #13677, I ended up doing a bit of
refactoring in type pretty-printing.
* We were using TyOpPrec and FunPrec rather inconsitently, so
I made it consisent.
* That exposed the fact that we were a bit undecided about whether
to print
a + b -> c + d vs (a+b) -> (c+d)
and similarly
a ~ [b] => blah vs (a ~ [b]) => blah
I decided to make TyOpPrec and FunPrec compare equal
(in BasicTypes), so (->) is treated as equal precedence with
other type operators, so you get the unambiguous forms above,
even though they have more parens.
We could readily reverse this decision.
See Note [Type operator precedence] in BasicTypes
* I fixed a bug in pretty-printing of HsType where some
parens were omitted by mistake.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: validate
Reviewers: bgamari, austin
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3501
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we were unconditionally pretty-printing all type variable
binders when pretty-printing closed type families (e.g., in the output
of `:info` in GHCi). This threw me for a loop, so let's guard this behind
the `-fprint-explicit-foralls` flag.
Test Plan: make test TEST=T13420
Reviewers: goldfire, austin, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #13420
Differential Revision: https://phabricator.haskell.org/D3497
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
To handle wired in packages, we must rewrite all occurrences
of unit ids like base-4.9.0.0 to base. However, I forgot
to do this on unit ids that occurred in unit identifiers
passed via -instantiated-with. This patch handles that case,
plus a test.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: bgamari, austin
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3385
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
I observed a bug where if I modified the module which implemented
an hsig in another package, GHC would not recompile the signature
in this situation.
The root cause was that we were conflating modules from user
imports, and "system" module dependencies (from signature
merging and instantiation.) So this patch handles them separately.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, bgamari, austin
Subscribers: rwbarton, thomie, snowleopard
Differential Revision: https://phabricator.haskell.org/D3381
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This is required to make Haddock work correctly.
Comes with a Haddock submodule update for better rendering.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: bgamari, austin
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3335
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In error messages like this
• Couldn't match type ‘c’ with ‘f0 (a -> b)’
‘c’ is a rigid type variable bound by
the type signature for:
f :: ((a -> b) -> b) -> forall c. c -> a
we need to take case both to actually show that 'forall c',
and to make sure that its name lines with the 'c' in the
error message.
This has been shaky for some time, and this commit puts it on solid
ground. See TcRnTypes: Note [SigSkol SkolemInfo]
The main changes are
* SigSkol gets an extra field that records the way in which the
type signature was skolemised.
* The type in SigSkol is now the /un/-skolemised version
* pprSkolemInfo uses the info to make the tidy type line up
nicely
Lots of error message wibbles!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we would print out the munged package name
which looked like z-bkpcabal01-z-p-0.1.0.0. Now
it looks like: bkpcabal01-0.1.0.0:p.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, bgamari, austin
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3235
|
|
|
|
|
|
|
|
| |
Test Plan: validate
Reviewers: simonpj
Subscribers:
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: validate
Reviewers: simonpj, bgamari, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3230
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
- We incorrectly allowed subroling on injective data in
some cases. There is now a test to check for this case, and a Note.
- More commentary on how the subtyping with roles works.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: goldfire, austin, simonpj, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3222
|
|
|
|
|
|
| |
Bumps containers, time, and unix submodules.
This reverts commit c347a121b07d22fb91172337407986b6541e319d.
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: validate
Reviewers: bgamari, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3229
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This commit implements the plan in #13140:
* Today, roles in signature files default to representational. Let's change the
default to nominal, as this is the most flexible implementation side. If a
client of the signature needs to coerce with a type, the signature can be
adjusted to have more stringent requirements.
* If a parameter is declared as nominal in a signature, it can be implemented
by a data type which is actually representational.
* When merging abstract data declarations, we take the smallest role for every
parameter. The roles are considered fix once we specify the structure of an
ADT.
* Critically, abstract types are NOT injective, so we aren't allowed to
make inferences like "if T a ~R T b, then a ~N b" based on the nominal
role of a parameter in an abstract type (this would be unsound if the
parameter ended up being phantom.) This restriction is similar to the
restriction we have on newtypes.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, bgamari, austin, goldfire
Subscribers: goldfire, thomie
Differential Revision: https://phabricator.haskell.org/D3123
|