summaryrefslogtreecommitdiff
path: root/compiler/GHC/Rename/Expr.hs
diff options
context:
space:
mode:
authorsheaf <sam.derbyshire@gmail.com>2021-06-09 20:43:42 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-06-10 13:54:05 -0400
commit472c2bf003e9f3bb93b82265f2a0a7124f944421 (patch)
tree74767fe0b48521254b22350d4b1f34a3957adc06 /compiler/GHC/Rename/Expr.hs
parent61c51c00b6e12e309bc5643e89330b93d86f5449 (diff)
downloadhaskell-472c2bf003e9f3bb93b82265f2a0a7124f944421.tar.gz
Reword: representation instead of levity
fixes #19756, updates haddock submodule
Diffstat (limited to 'compiler/GHC/Rename/Expr.hs')
-rw-r--r--compiler/GHC/Rename/Expr.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/GHC/Rename/Expr.hs b/compiler/GHC/Rename/Expr.hs
index aff3ce3dbd..a85103d8ed 100644
--- a/compiler/GHC/Rename/Expr.hs
+++ b/compiler/GHC/Rename/Expr.hs
@@ -130,7 +130,7 @@ but several have a little bit of special treatment:
* SectionL and SectionR (left and right sections)
(`op` e) ==> rightSection op e
(e `op`) ==> leftSection (op e)
- where `leftSection` and `rightSection` are levity-polymorphic
+ where `leftSection` and `rightSection` are representation-polymorphic
wired-in Ids. See Note [Left and right sections]
* It's a bit painful to transform `OpApp e1 op e2` to a `HsExpansion`
@@ -613,19 +613,19 @@ Note the wrinkles:
sections , but only to eliminate special-purpose code paths in the
renamer and desugarer.
-* leftSection and rightSection must be levity-polymorphic, to allow
+* leftSection and rightSection must be representation-polymorphic, to allow
(+# 4#) and (4# +#) to work. See GHC.Types.Id.Make.
Note [Wired-in Ids for rebindable syntax] in
* leftSection and rightSection must be multiplicity-polymorphic.
(Test linear/should_compile/OldList showed this up.)
-* Because they are levity-polymorphic, we have to define them
+* Because they are representation-polymorphic, we have to define them
as wired-in Ids, with compulsory inlining. See
GHC.Types.Id.Make.leftSectionId, rightSectionId.
* leftSection is just ($) really; but unlike ($) it is
- levity polymorphic in the result type, so we can write
+ representation-polymorphic in the result type, so we can write
`(x +#)`, say.
* The type of leftSection must have an arrow in its first argument,