diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2016-10-28 17:54:36 -0700 |
---|---|---|
committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2016-11-16 21:31:59 -0800 |
commit | 31398fbc6d9ee0bd95de64b08becc38faf188972 (patch) | |
tree | 0ae632f650671447b96ce231781240b4d840097f /docs/users_guide/8.2.1-notes.rst | |
parent | b76958671cda1df9f6f0e1d54d681144d09cb06e (diff) | |
download | haskell-31398fbc6d9ee0bd95de64b08becc38faf188972.tar.gz |
Test for type synonym loops on TyCon.
Summary:
Previously, we tested for type synonym loops by doing
a syntactic test on the literal type synonym declarations.
However, in some cases, loops could go through hs-boot
files, leading to an infinite loop (#12042); a similar
situation can occur when signature merging.
This commit replaces the syntactic test with a test on
TyCon, simply by walking down all type synonyms until
we bottom out, or find we've looped back. It's a lot
simpler.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, austin, bgamari
Subscribers: goldfire, thomie
Differential Revision: https://phabricator.haskell.org/D2656
GHC Trac Issues: #12042
Diffstat (limited to 'docs/users_guide/8.2.1-notes.rst')
-rw-r--r-- | docs/users_guide/8.2.1-notes.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/users_guide/8.2.1-notes.rst b/docs/users_guide/8.2.1-notes.rst index 748bc80985..1699ebb39f 100644 --- a/docs/users_guide/8.2.1-notes.rst +++ b/docs/users_guide/8.2.1-notes.rst @@ -87,6 +87,16 @@ Compiler pre-processor causing the pre-processor to warn on uses of the ``#if`` directive on undefined identifiers. +- GHC will no longer automatically infer the kind of higher-rank type synonyms; + you must explicitly explicitly annotate the synonym with a kind signature. + For example, given:: + + data T :: (forall k. k -> Type) -> Type + + to define a synonym of ``T``, you must write:: + + data TSyn = (T :: (forall k. k -> Type) -> Type) + GHCi ~~~~ |