[commit: ghc] master: Make the Div and Mod type families `infixl 7` (303106d)

git at git.haskell.org git at git.haskell.org
Mon Jan 8 05:06:34 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/303106d55d75a9c796e58867cb541ad136bb217f/ghc

>---------------------------------------------------------------

commit 303106d55d75a9c796e58867cb541ad136bb217f
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


>---------------------------------------------------------------

303106d55d75a9c796e58867cb541ad136bb217f
 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