Teo Camarasu pushed to branch wip/T26848 at Glasgow Haskell Compiler / GHC Commits: 770ccc9b by Teo Camarasu at 2026-01-30T13:42:19+00:00 Delete unecessary GHC.Internal.Data.Ix This module merely re-exports GHC.Internal.Ix. It was copied from `base` when `ghc-internal` was split, but there is no reason to have this now. So, let's delete it. Resolves #26848 - - - - - 7 changed files: - libraries/base/src/Data/Ix.hs - libraries/ghc-internal/ghc-internal.cabal.in - − libraries/ghc-internal/src/GHC/Internal/Data/Ix.hs - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/interface-stability/base-exports.stdout-mingw32 - testsuite/tests/interface-stability/base-exports.stdout-ws-32 Changes: ===================================== libraries/base/src/Data/Ix.hs ===================================== @@ -1,4 +1,4 @@ -{-# LANGUAGE Safe #-} +{-# LANGUAGE Trustworthy #-} -- | -- @@ -42,4 +42,4 @@ module Data.Ix -- https://www.haskell.org/onlinereport/haskell2010/haskellch19.html. ) where -import GHC.Internal.Data.Ix +import GHC.Internal.Ix ===================================== libraries/ghc-internal/ghc-internal.cabal.in ===================================== @@ -153,7 +153,6 @@ Library GHC.Internal.Data.Functor.Identity GHC.Internal.Data.Functor.Utils GHC.Internal.Data.IORef - GHC.Internal.Data.Ix GHC.Internal.Data.List GHC.Internal.Data.List.NonEmpty GHC.Internal.Data.Maybe ===================================== libraries/ghc-internal/src/GHC/Internal/Data/Ix.hs deleted ===================================== @@ -1,64 +0,0 @@ -{-# LANGUAGE Trustworthy #-} - ------------------------------------------------------------------------------ --- | --- Module : GHC.Internal.Data.Ix --- Copyright : (c) The University of Glasgow 2001 --- License : BSD-style (see the file libraries/base/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : stable --- Portability : portable --- --- The 'Ix' class is used to map a contiguous subrange of values in --- type onto integers. It is used primarily for array indexing --- (see the array package). 'Ix' uses row-major order. --- ------------------------------------------------------------------------------ - -module GHC.Internal.Data.Ix - ( - -- * The 'Ix' class - Ix - ( range - , index - , inRange - , rangeSize - ) - -- Ix instances: - -- - -- Ix Char - -- Ix Int - -- Ix Integer - -- Ix Bool - -- Ix Ordering - -- Ix () - -- (Ix a, Ix b) => Ix (a, b) - -- ... - - -- * Deriving Instances of 'Ix' - -- | Derived instance declarations for the class 'Ix' are only possible - -- for enumerations (i.e. datatypes having only nullary constructors) - -- and single-constructor datatypes, including arbitrarily large tuples, - -- whose constituent types are instances of 'Ix'. - -- - -- * For an enumeration, the nullary constructors are assumed to be - -- numbered left-to-right with the indices being 0 to n-1 inclusive. This - -- is the same numbering defined by the 'Enum' class. For example, given - -- the datatype: - -- - -- > data Colour = Red | Orange | Yellow | Green | Blue | Indigo | Violet - -- - -- we would have: - -- - -- > range (Yellow,Blue) == [Yellow,Green,Blue] - -- > index (Yellow,Blue) Green == 1 - -- > inRange (Yellow,Blue) Red == False - -- - -- * For single-constructor datatypes, the derived instance declarations - -- are as shown for tuples in chapter 19, section 2 of the Haskell 2010 report: - -- https://www.haskell.org/onlinereport/haskell2010/haskellch19.html. - - ) where - -import GHC.Internal.Ix ===================================== testsuite/tests/interface-stability/base-exports.stdout ===================================== @@ -1286,7 +1286,7 @@ module Data.Int where data Int8 = ... module Data.Ix where - -- Safety: Safe + -- Safety: Trustworthy type Ix :: * -> Constraint class GHC.Internal.Classes.Ord a => Ix a where range :: (a, a) -> [a] ===================================== testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs ===================================== @@ -1286,7 +1286,7 @@ module Data.Int where data Int8 = ... module Data.Ix where - -- Safety: Safe + -- Safety: Trustworthy type Ix :: * -> Constraint class GHC.Internal.Classes.Ord a => Ix a where range :: (a, a) -> [a] ===================================== testsuite/tests/interface-stability/base-exports.stdout-mingw32 ===================================== @@ -1286,7 +1286,7 @@ module Data.Int where data Int8 = ... module Data.Ix where - -- Safety: Safe + -- Safety: Trustworthy type Ix :: * -> Constraint class GHC.Internal.Classes.Ord a => Ix a where range :: (a, a) -> [a] ===================================== testsuite/tests/interface-stability/base-exports.stdout-ws-32 ===================================== @@ -1286,7 +1286,7 @@ module Data.Int where data Int8 = ... module Data.Ix where - -- Safety: Safe + -- Safety: Trustworthy type Ix :: * -> Constraint class GHC.Internal.Classes.Ord a => Ix a where range :: (a, a) -> [a] View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/770ccc9bfb7aed07cd37fea4c34dbcbc... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/770ccc9bfb7aed07cd37fea4c34dbcbc... You're receiving this email because of your account on gitlab.haskell.org.