summaryrefslogtreecommitdiff
path: root/libraries/ghc-prim
diff options
context:
space:
mode:
authorHaskellMouse <rinat.stryungis@serokell.io>2020-06-28 12:35:58 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-09-17 08:49:51 -0400
commit3c94c81629ac9159775b8b70baf2c635f0331708 (patch)
tree21ba5b8bbbd384aa10ddd0af4f9439a33233ee70 /libraries/ghc-prim
parentda8f4ddd76bac18c721aeaa247725953604206d3 (diff)
downloadhaskell-3c94c81629ac9159775b8b70baf2c635f0331708.tar.gz
Added explicit fixity to (~).
Solves #18252
Diffstat (limited to 'libraries/ghc-prim')
-rw-r--r--libraries/ghc-prim/GHC/Types.hs7
-rw-r--r--libraries/ghc-prim/changelog.md4
2 files changed, 11 insertions, 0 deletions
diff --git a/libraries/ghc-prim/GHC/Types.hs b/libraries/ghc-prim/GHC/Types.hs
index 5198a486e4..2883e3b04c 100644
--- a/libraries/ghc-prim/GHC/Types.hs
+++ b/libraries/ghc-prim/GHC/Types.hs
@@ -256,13 +256,20 @@ inside GHC, to change the kind and type.
-- about the difference between heterogeneous equality @~~@ and
-- homogeneous equality @~@, this is printed as @~@ unless
-- @-fprint-equality-relations@ is set.
+--
+-- In @0.7.0@, the fixity was set to @infix 4@ to match the fixity of 'Data.Type.Equality.:~~:'.
class a ~~ b
+
-- See also Note [The equality types story] in GHC.Builtin.Types.Prim
-- | Lifted, homogeneous equality. By lifted, we mean that it
-- can be bogus (deferred type error). By homogeneous, the two
-- types @a@ and @b@ must have the same kinds.
+
+-- In @0.7.0@, the fixity was set to @infix 4@ to match the fixity of 'Data.Type.Equality.:~:'.
class a ~ b
+
+infix 4 ~, ~~
-- See also Note [The equality types story] in GHC.Builtin.Types.Prim
-- | @Coercible@ is a two-parameter class that has instances for types @a@ and @b@ if
diff --git a/libraries/ghc-prim/changelog.md b/libraries/ghc-prim/changelog.md
index effa32479f..3df0b5e2ed 100644
--- a/libraries/ghc-prim/changelog.md
+++ b/libraries/ghc-prim/changelog.md
@@ -24,6 +24,10 @@
interlockedExchangeAddr# :: Addr# -> Addr# -> State# s -> (# State# s, Addr# #)
interlockedExchangeInt# :: Addr# -> Int# -> State# s -> (# State# s, Int# #)
+- Add an explicit fixity for `(~)` and `(~~)`:
+
+ infix 4 ~, ~~
+
## 0.6.1 (edit as necessary)
- Shipped with GHC 8.10.1