X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Data%2FIx.hs;h=fda6d58c4ad7bb89e56ff30a98c638ce97fa7f25;hb=748003827970cfc57cb26db256b72d16e504bb37;hp=f9ce182b4723111d3e3ee856202ab8010c824080;hpb=9998ccb135e022aee442d32bf1f9e723a2256887;p=ghc-base.git diff --git a/Data/Ix.hs b/Data/Ix.hs index f9ce182..fda6d58 100644 --- a/Data/Ix.hs +++ b/Data/Ix.hs @@ -16,12 +16,12 @@ module Data.Ix ( -- * The 'Ix' class - Ix - ( range -- :: (Ix a) => (a,a) -> [a] - , index -- :: (Ix a) => (a,a) -> a -> Int - , inRange -- :: (Ix a) => (a,a) -> a -> Bool - , rangeSize -- :: (Ix a) => (a,a) -> Int - ) + Ix + ( range -- :: (Ix a) => (a,a) -> [a] + , index -- :: (Ix a) => (a,a) -> a -> Int + , inRange -- :: (Ix a) => (a,a) -> a -> Bool + , rangeSize -- :: (Ix a) => (a,a) -> Int + ) -- Ix instances: -- -- Ix Char @@ -46,13 +46,13 @@ module Data.Ix -- is the same numbering defined by the 'Enum' class. For example, given -- the datatype: -- - -- > data Colour = Red | Orange | Yellow | Green | Blue | Indigo | Violet + -- > 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 + -- > 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 Figure 1 @@ -60,7 +60,7 @@ module Data.Ix ) where -import Prelude +-- import Prelude #ifdef __GLASGOW_HASKELL__ import GHC.Arr