summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-06-23 18:40:50 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-07-28 13:18:31 -0400
commitdabe61138a561e9a82961f81dbe276f9d909c1a7 (patch)
treee5a5b8d361f61e1548ce247f21fcb560b0efe657 /docs
parentf325676956df650368c6ebbbbd53c69971551cd4 (diff)
downloadhaskell-dabe61138a561e9a82961f81dbe276f9d909c1a7.tar.gz
Document DerivingVia unsafety (#19786)
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/exts/safe_haskell.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/users_guide/exts/safe_haskell.rst b/docs/users_guide/exts/safe_haskell.rst
index 22508d5d7c..da62f093b2 100644
--- a/docs/users_guide/exts/safe_haskell.rst
+++ b/docs/users_guide/exts/safe_haskell.rst
@@ -273,8 +273,9 @@ Furthermore, we restrict the following features:
site. This is a detailed restriction, please refer to :ref:`Safe Overlapping
Instances <safe-overlapping-instances>` for details.
-- :extension:`GeneralisedNewtypeDeriving` — GND is not allowed in the safe
- language. This is due to the ability of it to violate module boundaries when
+- :extension:`GeneralisedNewtypeDeriving` and :extension:`DerivingVia`
+ — GND and DerivingVia are not allowed in the safe language.
+ This is due to the ability of them to violate module boundaries when
module authors forget to put nominal role annotations on their types as
appropriate. For this reason, the ``Data.Coerce`` module is also considered
unsafe. We are hoping to find a better solution here in the future.