[commit: ghc] ghc-8.4: Make the Div and Mod type families `infixl 7` (fdfaa56)
git at git.haskell.org
git at git.haskell.org
Mon Jan 8 14:55:11 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.4
Link : http://ghc.haskell.org/trac/ghc/changeset/fdfaa56b04b2cefb86e4dc557b1d163fd2e062dc/ghc
>---------------------------------------------------------------
commit fdfaa56b04b2cefb86e4dc557b1d163fd2e062dc
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date: Sun Jan 7 13:05:13 2018 -0500
Make the Div and Mod type families `infixl 7`
Commit fa8035e3ee83aff5a20fc5e7e2697bac1686d6a6 added `Div`
and `Mod` type families to `GHC.TypeNats`. However, they did not add
the corresponding fixities! Currently, we have that both `div` and
`mod` (at the value level) are `infixl 7`, so we should adopt the
same fixities for the type-level `Div` and `Mod` as well.
Test Plan: It compiles
Reviewers: hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #14640
Differential Revision: https://phabricator.haskell.org/D4291
(cherry picked from commit 303106d55d75a9c796e58867cb541ad136bb217f)
>---------------------------------------------------------------
fdfaa56b04b2cefb86e4dc557b1d163fd2e062dc
libraries/base/GHC/TypeNats.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libraries/base/GHC/TypeNats.hs b/libraries/base/GHC/TypeNats.hs
index a5ee0fc..c9055dd 100644
--- a/libraries/base/GHC/TypeNats.hs
+++ b/libraries/base/GHC/TypeNats.hs
@@ -99,7 +99,7 @@ instance Read SomeNat where
infix 4 <=?, <=
infixl 6 +, -
-infixl 7 *
+infixl 7 *, `Div`, `Mod`
infixr 8 ^
-- | Comparison of type-level naturals, as a constraint.
More information about the ghc-commits
mailing list