summaryrefslogtreecommitdiff
path: root/libraries/template-haskell
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-07-29 20:23:53 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-08-02 04:18:00 -0400
commit13af2feeca20e10d7dda675ad0634689a1931f17 (patch)
treef2c4d214f187aa4b392551417db5d840deb9002a /libraries/template-haskell
parent20ef67a3776e3d2737dc385f67cb89c90199b20f (diff)
downloadhaskell-13af2feeca20e10d7dda675ad0634689a1931f17.tar.gz
Disallow nonlinear fields in Template Haskell (#18378)
Diffstat (limited to 'libraries/template-haskell')
-rw-r--r--libraries/template-haskell/Language/Haskell/TH/Syntax.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
index 8f8ddaf1e8..44b33a217b 100644
--- a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
+++ b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
@@ -2545,6 +2545,10 @@ data DecidedStrictness = DecidedLazy
-- @
--
-- In @MkBar@, 'ForallC' will quantify @a@, @b@, and @c@.
+--
+-- Multiplicity annotations for data types are currently not supported
+-- in Template Haskell (i.e. all fields represented by Template Haskell
+-- will be linear).
data Con = NormalC Name [BangType] -- ^ @C Int a@
| RecC Name [VarBangType] -- ^ @C { v :: Int, w :: a }@
| InfixC BangType Name BangType -- ^ @Int :+ a@