mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
612 lines
21 KiB
Diff
612 lines
21 KiB
Diff
# https://github.com/FranklinChen/hugs98-plus-Sep2006/commit/5ca5d8da5cc692127d0621f652d720b8863772d7
|
|
# https://github.com/FranklinChen/hugs98-plus-Sep2006/commit/4f323b9ab1fd6c53fe48d72aad4e7fba2ce8850c
|
|
|
|
--- packages/Cabal/DefaultSetup.lhs.orig 2006-09-21 04:14:42.000000000 +0545
|
|
+++ packages/Cabal/DefaultSetup.lhs 2022-08-09 01:55:35.000000000 +0545
|
|
@@ -1,4 +1,3 @@
|
|
-#!/usr/bin/runhaskell
|
|
> module Main where
|
|
> import Distribution.Simple
|
|
> main :: IO ()
|
|
|
|
--- packages/base/Data/Array/Base.hs.orig 2006-09-21 04:13:37.000000000 +0545
|
|
+++ packages/base/Data/Array/Base.hs 2022-08-09 02:20:35.000000000 +0545
|
|
@@ -180,8 +180,7 @@
|
|
|
|
{-# RULES
|
|
"listArray/Array" listArray =
|
|
- \lu es -> runST (listArrayST lu es >>= ArrST.unsafeFreezeSTArray)
|
|
- #-}
|
|
+ \lu es -> runST (listArrayST lu es >>= ArrST.unsafeFreezeSTArray) #-}
|
|
|
|
{-# INLINE listUArrayST #-}
|
|
listUArrayST :: (MArray (STUArray s) e (ST s), Ix i)
|
|
@@ -252,8 +251,7 @@
|
|
"listArray/UArray/Word32" listArray
|
|
= (\lu es -> runST (listUArrayST lu es >>= unsafeFreezeSTUArray)) :: ListUArray Word32
|
|
"listArray/UArray/Word64" listArray
|
|
- = (\lu es -> runST (listUArrayST lu es >>= unsafeFreezeSTUArray)) :: ListUArray Word64
|
|
- #-}
|
|
+ = (\lu es -> runST (listUArrayST lu es >>= unsafeFreezeSTUArray)) :: ListUArray Word64 #-}
|
|
#endif
|
|
|
|
{-# INLINE (!) #-}
|
|
@@ -480,8 +478,7 @@
|
|
|
|
{-# SPECIALISE
|
|
showsIArray :: (IArray UArray e, Ix i, Show i, Show e) =>
|
|
- Int -> UArray i e -> ShowS
|
|
- #-}
|
|
+ Int -> UArray i e -> ShowS #-}
|
|
|
|
showsIArray :: (IArray a e, Ix i, Show i, Show e) => Int -> a i e -> ShowS
|
|
showsIArray p a =
|
|
@@ -1525,8 +1522,7 @@
|
|
|
|
{-# RULES
|
|
"freeze/STArray" freeze = ArrST.freezeSTArray
|
|
-"freeze/STUArray" freeze = freezeSTUArray
|
|
- #-}
|
|
+"freeze/STUArray" freeze = freezeSTUArray #-}
|
|
#endif /* __GLASGOW_HASKELL__ */
|
|
|
|
-- In-place conversion of mutable arrays to immutable ones places
|
|
@@ -1567,8 +1563,7 @@
|
|
|
|
{-# RULES
|
|
"unsafeFreeze/STArray" unsafeFreeze = ArrST.unsafeFreezeSTArray
|
|
-"unsafeFreeze/STUArray" unsafeFreeze = unsafeFreezeSTUArray
|
|
- #-}
|
|
+"unsafeFreeze/STUArray" unsafeFreeze = unsafeFreezeSTUArray #-}
|
|
|
|
-----------------------------------------------------------------------------
|
|
-- Thawing
|
|
@@ -1597,8 +1592,7 @@
|
|
|
|
{-# RULES
|
|
"thaw/STArray" thaw = ArrST.thawSTArray
|
|
-"thaw/STUArray" thaw = thawSTUArray
|
|
- #-}
|
|
+"thaw/STUArray" thaw = thawSTUArray #-}
|
|
#endif /* __GLASGOW_HASKELL__ */
|
|
|
|
#ifdef __HUGS__
|
|
@@ -1658,8 +1652,7 @@
|
|
|
|
{-# RULES
|
|
"unsafeThaw/STArray" unsafeThaw = ArrST.unsafeThawSTArray
|
|
-"unsafeThaw/STUArray" unsafeThaw = unsafeThawSTUArray
|
|
- #-}
|
|
+"unsafeThaw/STUArray" unsafeThaw = unsafeThawSTUArray #-}
|
|
#endif /* __GLASGOW_HASKELL__ */
|
|
|
|
-- | Casts an 'STUArray' with one element type into one with a
|
|
|
|
|
|
--- packages/base/Data/Array/Diff.hs.orig 2006-09-21 04:13:37.000000000 +0545
|
|
+++ packages/base/Data/Array/Diff.hs 2022-08-09 02:26:34.000000000 +0545
|
|
@@ -364,8 +364,7 @@
|
|
return (DiffArray var)
|
|
|
|
{-# RULES
|
|
-"freeze/DiffArray" freeze = freezeDiffArray
|
|
- #-}
|
|
+"freeze/DiffArray" freeze = freezeDiffArray #-}
|
|
|
|
-- unsafeFreezeDiffArray is really unsafe. Better don't use the old
|
|
-- array at all after freezing. The contents of the source array will
|
|
@@ -379,8 +378,7 @@
|
|
return (DiffArray var)
|
|
|
|
{-# RULES
|
|
-"unsafeFreeze/DiffArray" unsafeFreeze = unsafeFreezeDiffArray
|
|
- #-}
|
|
+"unsafeFreeze/DiffArray" unsafeFreeze = unsafeFreezeDiffArray #-}
|
|
|
|
thawDiffArray :: (MArray a e IO, Ix ix)
|
|
=> IOToDiffArray a ix e
|
|
@@ -419,5 +417,4 @@
|
|
return a''
|
|
|
|
{-# RULES
|
|
-"unsafeThaw/DiffArray" unsafeThaw = unsafeThawDiffArray
|
|
- #-}
|
|
+"unsafeThaw/DiffArray" unsafeThaw = unsafeThawDiffArray #-}
|
|
|
|
|
|
--- packages/base/Data/Array/IO.hs.orig 2006-09-21 04:13:37.000000000 +0545
|
|
+++ packages/base/Data/Array/IO.hs 2022-08-09 02:27:58.000000000 +0545
|
|
@@ -63,8 +63,7 @@
|
|
|
|
{-# RULES
|
|
"freeze/IOArray" freeze = freezeIOArray
|
|
-"freeze/IOUArray" freeze = freezeIOUArray
|
|
- #-}
|
|
+"freeze/IOUArray" freeze = freezeIOUArray #-}
|
|
|
|
{-# INLINE unsafeFreezeIOArray #-}
|
|
unsafeFreezeIOArray :: Ix ix => IOArray ix e -> IO (Array ix e)
|
|
@@ -76,8 +75,7 @@
|
|
|
|
{-# RULES
|
|
"unsafeFreeze/IOArray" unsafeFreeze = unsafeFreezeIOArray
|
|
-"unsafeFreeze/IOUArray" unsafeFreeze = unsafeFreezeIOUArray
|
|
- #-}
|
|
+"unsafeFreeze/IOUArray" unsafeFreeze = unsafeFreezeIOUArray #-}
|
|
|
|
-----------------------------------------------------------------------------
|
|
-- Thawing
|
|
@@ -94,8 +92,7 @@
|
|
|
|
{-# RULES
|
|
"thaw/IOArray" thaw = thawIOArray
|
|
-"thaw/IOUArray" thaw = thawIOUArray
|
|
- #-}
|
|
+"thaw/IOUArray" thaw = thawIOUArray #-}
|
|
|
|
{-# INLINE unsafeThawIOArray #-}
|
|
unsafeThawIOArray :: Ix ix => Array ix e -> IO (IOArray ix e)
|
|
@@ -111,8 +108,7 @@
|
|
|
|
{-# RULES
|
|
"unsafeThaw/IOArray" unsafeThaw = unsafeThawIOArray
|
|
-"unsafeThaw/IOUArray" unsafeThaw = unsafeThawIOUArray
|
|
- #-}
|
|
+"unsafeThaw/IOUArray" unsafeThaw = unsafeThawIOUArray #-}
|
|
|
|
-- ---------------------------------------------------------------------------
|
|
-- hGetArray
|
|
|
|
|
|
--- packages/base/Data/ByteString.hs.orig 2006-09-21 04:13:38.000000000 +0545
|
|
+++ packages/base/Data/ByteString.hs 2022-08-09 02:32:07.000000000 +0545
|
|
@@ -447,8 +447,7 @@
|
|
loop (p `plusPtr` off) (len-1) []
|
|
|
|
{-# RULES
|
|
- "FPS unpack-list" [1] forall p . unpackFoldr p (:) [] = unpackList p
|
|
- #-}
|
|
+ "FPS unpack-list" [1] forall p . unpackFoldr p (:) [] = unpackList p #-}
|
|
|
|
#endif
|
|
|
|
@@ -484,9 +483,7 @@
|
|
-- v2 fusion
|
|
"FPS length/loop" forall loop s .
|
|
length (loopArr (loopWrapper loop s)) =
|
|
- lengthU (loopArr (loopWrapper loop s))
|
|
-
|
|
- #-}
|
|
+ lengthU (loopArr (loopWrapper loop s)) #-}
|
|
|
|
------------------------------------------------------------------------
|
|
|
|
@@ -794,9 +791,7 @@
|
|
|
|
"FPS maximum/loop" forall loop s .
|
|
maximum (loopArr (loopWrapper loop s)) =
|
|
- maximumU (loopArr (loopWrapper loop s))
|
|
-
|
|
- #-}
|
|
+ maximumU (loopArr (loopWrapper loop s)) #-}
|
|
|
|
------------------------------------------------------------------------
|
|
|
|
@@ -974,14 +969,12 @@
|
|
|
|
{-# RULES
|
|
"FPS specialise break (x==)" forall x.
|
|
- break ((==) x) = breakByte x
|
|
- #-}
|
|
+ break ((==) x) = breakByte x #-}
|
|
|
|
#if __GLASGOW_HASKELL__ >= 605
|
|
{-# RULES
|
|
"FPS specialise break (==x)" forall x.
|
|
- break (==x) = breakByte x
|
|
- #-}
|
|
+ break (==x) = breakByte x #-}
|
|
#endif
|
|
|
|
-- | 'breakByte' breaks its ByteString argument at the first occurence
|
|
@@ -1028,14 +1021,12 @@
|
|
|
|
{-# RULES
|
|
"FPS specialise span (x==)" forall x.
|
|
- span ((==) x) = spanByte x
|
|
- #-}
|
|
+ span ((==) x) = spanByte x #-}
|
|
|
|
#if __GLASGOW_HASKELL__ >= 605
|
|
{-# RULES
|
|
"FPS specialise span (==x)" forall x.
|
|
- span (==x) = spanByte x
|
|
- #-}
|
|
+ span (==x) = spanByte x #-}
|
|
#endif
|
|
|
|
-- | 'spanEnd' behaves like 'span' but from the end of the 'ByteString'.
|
|
@@ -1200,8 +1191,7 @@
|
|
|
|
{-# RULES
|
|
"FPS specialise join c -> joinByte" forall c s1 s2 .
|
|
- join (singleton c) (s1 : s2 : []) = joinWithByte c s1 s2
|
|
- #-}
|
|
+ join (singleton c) (s1 : s2 : []) = joinWithByte c s1 s2 #-}
|
|
|
|
--
|
|
-- | /O(n)/ joinWithByte. An efficient way to join to two ByteStrings
|
|
@@ -1402,14 +1392,12 @@
|
|
|
|
{-# RULES
|
|
"FPS specialise filter (== x)" forall x.
|
|
- filter ((==) x) = filterByte x
|
|
- #-}
|
|
+ filter ((==) x) = filterByte x #-}
|
|
|
|
#if __GLASGOW_HASKELL__ >= 605
|
|
{-# RULES
|
|
"FPS specialise filter (== x)" forall x.
|
|
- filter (== x) = filterByte x
|
|
- #-}
|
|
+ filter (== x) = filterByte x #-}
|
|
#endif
|
|
|
|
--
|
|
@@ -1426,14 +1414,12 @@
|
|
|
|
{-# RULES
|
|
"FPS specialise filter (x /=)" forall x.
|
|
- filter ((/=) x) = filterNotByte x
|
|
- #-}
|
|
+ filter ((/=) x) = filterNotByte x #-}
|
|
|
|
#if __GLASGOW_HASKELL__ >= 605
|
|
{-# RULES
|
|
"FPS specialise filter (/= x)" forall x.
|
|
- filter (/= x) = filterNotByte x
|
|
- #-}
|
|
+ filter (/= x) = filterNotByte x #-}
|
|
#endif
|
|
|
|
-- | /O(n)/ The 'find' function takes a predicate and a ByteString,
|
|
@@ -1584,9 +1570,7 @@
|
|
{-# RULES
|
|
|
|
"FPS specialise zipWith" forall (f :: Word8 -> Word8 -> Word8) p q .
|
|
- zipWith f p q = unpack (zipWith' f p q)
|
|
-
|
|
- #-}
|
|
+ zipWith f p q = unpack (zipWith' f p q) #-}
|
|
|
|
-- | /O(n)/ 'unzip' transforms a list of pairs of bytes into a pair of
|
|
-- ByteStrings. Note that this performs two 'pack' operations.
|
|
|
|
|
|
--- packages/base/Data/ByteString/Char8.hs.orig 2006-09-21 04:13:38.000000000 +0545
|
|
+++ packages/base/Data/ByteString/Char8.hs 2022-08-09 02:33:27.000000000 +0545
|
|
@@ -312,8 +312,7 @@
|
|
|
|
{-# RULES
|
|
"FPS pack/packAddress" forall s .
|
|
- pack (unpackCString# s) = B.packAddress s
|
|
- #-}
|
|
+ pack (unpackCString# s) = B.packAddress s #-}
|
|
|
|
#endif
|
|
|
|
@@ -779,8 +778,7 @@
|
|
|
|
{-# RULES
|
|
"FPS specialise break -> breakSpace"
|
|
- break isSpace = breakSpace
|
|
- #-}
|
|
+ break isSpace = breakSpace #-}
|
|
|
|
-- | 'breakSpace' returns the pair of ByteStrings when the argument is
|
|
-- broken at the first whitespace byte. I.e.
|
|
@@ -806,8 +804,7 @@
|
|
|
|
{-# RULES
|
|
"FPS specialise dropWhile isSpace -> dropSpace"
|
|
- dropWhile isSpace = dropSpace
|
|
- #-}
|
|
+ dropWhile isSpace = dropSpace #-}
|
|
|
|
-- | 'dropSpace' efficiently returns the 'ByteString' argument with
|
|
-- white space Chars removed from the front. It is more efficient than
|
|
|
|
|
|
--- packages/base/Data/ByteString/Fusion.hs.orig 2006-09-21 04:13:38.000000000 +0545
|
|
+++ packages/base/Data/ByteString/Fusion.hs 2022-08-09 02:34:34.000000000 +0545
|
|
@@ -236,9 +236,7 @@
|
|
|
|
"FPS loop/loop fusion!" forall em1 em2 start1 start2 arr.
|
|
loopU em2 start2 (loopArr (loopU em1 start1 arr)) =
|
|
- loopSndAcc (loopU (em1 `fuseEFL` em2) (start1 :*: start2) arr)
|
|
-
|
|
- #-}
|
|
+ loopSndAcc (loopU (em1 `fuseEFL` em2) (start1 :*: start2) arr) #-}
|
|
|
|
--
|
|
-- Functional list/array fusion for lazy ByteStrings.
|
|
@@ -263,9 +261,7 @@
|
|
|
|
"FPS lazy loop/loop fusion!" forall em1 em2 start1 start2 arr.
|
|
loopL em2 start2 (loopArr (loopL em1 start1 arr)) =
|
|
- loopSndAcc (loopL (em1 `fuseEFL` em2) (start1 :*: start2) arr)
|
|
-
|
|
- #-}
|
|
+ loopSndAcc (loopL (em1 `fuseEFL` em2) (start1 :*: start2) arr) #-}
|
|
|
|
|
|
{-
|
|
@@ -536,9 +532,7 @@
|
|
|
|
"FPS down/noAcc loop fusion" forall f1 f2 acc1 acc2.
|
|
sequenceLoops (doDownLoop f1 acc1) (doNoAccLoop f2 acc2) =
|
|
- doDownLoop (f1 `fuseAccNoAccEFL` f2) (acc1 :*: acc2)
|
|
-
|
|
- #-}
|
|
+ doDownLoop (f1 `fuseAccNoAccEFL` f2) (acc1 :*: acc2) #-}
|
|
|
|
{-
|
|
|
|
|
|
--- packages/base/Data/List.hs.orig 2006-09-21 04:13:38.000000000 +0545
|
|
+++ packages/base/Data/List.hs 2022-08-09 02:35:19.000000000 +0545
|
|
@@ -479,8 +479,7 @@
|
|
|
|
{-# RULES
|
|
"maximumInt" maximum = (strictMaximum :: [Int] -> Int);
|
|
- "maximumInteger" maximum = (strictMaximum :: [Integer] -> Integer)
|
|
- #-}
|
|
+ "maximumInteger" maximum = (strictMaximum :: [Integer] -> Integer) #-}
|
|
|
|
-- We can't make the overloaded version of maximum strict without
|
|
-- changing its semantics (max might not be strict), but we can for
|
|
@@ -499,8 +498,7 @@
|
|
|
|
{-# RULES
|
|
"minimumInt" minimum = (strictMinimum :: [Int] -> Int);
|
|
- "minimumInteger" minimum = (strictMinimum :: [Integer] -> Integer)
|
|
- #-}
|
|
+ "minimumInteger" minimum = (strictMinimum :: [Integer] -> Integer) #-}
|
|
|
|
strictMinimum :: (Ord a) => [a] -> a
|
|
strictMinimum [] = errorEmptyList "minimum"
|
|
|
|
|
|
--- packages/base/Control/Exception.hs.orig 2006-09-21 04:13:38.000000000 +0545
|
|
+++ packages/base/Control/Exception.hs 2022-08-09 01:58:17.000000000 +0545
|
|
@@ -429,9 +429,7 @@
|
|
-- -----------------------------------------------------------------------------
|
|
-- Asynchronous exceptions
|
|
|
|
-{- $async
|
|
-
|
|
- #AsynchronousExceptions# Asynchronous exceptions are so-called because they arise due to
|
|
+{- $async #AsynchronousExceptions# Asynchronous exceptions are so-called because they arise due to
|
|
external influences, and can be raised at any point during execution.
|
|
'StackOverflow' and 'HeapOverflow' are two examples of
|
|
system-generated asynchronous exceptions.
|
|
|
|
--- packages/base/Control/Concurrent.hs.orig 2006-09-21 04:13:35.000000000 +0545
|
|
+++ packages/base/Control/Concurrent.hs 2022-08-09 01:57:52.000000000 +0545
|
|
@@ -404,9 +404,7 @@
|
|
-- ---------------------------------------------------------------------------
|
|
-- More docs
|
|
|
|
-{- $osthreads
|
|
-
|
|
- #osthreads# In GHC, threads created by 'forkIO' are lightweight threads, and
|
|
+{- $osthreads #osthreads# In GHC, threads created by 'forkIO' are lightweight threads, and
|
|
are managed entirely by the GHC runtime. Typically Haskell
|
|
threads are an order of magnitude or two more efficient (in
|
|
terms of both time and space) than operating system threads.
|
|
|
|
|
|
--- packages/base/Control/Arrow.hs.orig 2006-09-21 04:13:33.000000000 +0545
|
|
+++ packages/base/Control/Arrow.hs 2022-08-09 02:17:53.000000000 +0545
|
|
@@ -110,8 +110,7 @@
|
|
"compose/first" forall f g .
|
|
first f >>> first g = first (f >>> g)
|
|
"compose/second" forall f g .
|
|
- second f >>> second g = second (f >>> g)
|
|
- #-}
|
|
+ second f >>> second g = second (f >>> g) #-}
|
|
|
|
-- Ordinary functions are arrows.
|
|
|
|
@@ -222,8 +221,7 @@
|
|
"compose/left" forall f g .
|
|
left f >>> left g = left (f >>> g)
|
|
"compose/right" forall f g .
|
|
- right f >>> right g = right (f >>> g)
|
|
- #-}
|
|
+ right f >>> right g = right (f >>> g) #-}
|
|
|
|
instance ArrowChoice (->) where
|
|
left f = f +++ id
|
|
|
|
|
|
--- packages/base/Foreign/C/Types.hs.orig 2006-09-21 04:13:34.000000000 +0545
|
|
+++ packages/base/Foreign/C/Types.hs 2022-08-09 02:36:30.000000000 +0545
|
|
@@ -141,8 +141,7 @@
|
|
"fromIntegral/CLong->a" fromIntegral = \(CLong x) -> fromIntegral x
|
|
"fromIntegral/CULong->a" fromIntegral = \(CULong x) -> fromIntegral x
|
|
"fromIntegral/CLLong->a" fromIntegral = \(CLLong x) -> fromIntegral x
|
|
-"fromIntegral/CULLong->a" fromIntegral = \(CULLong x) -> fromIntegral x
|
|
- #-}
|
|
+"fromIntegral/CULLong->a" fromIntegral = \(CULLong x) -> fromIntegral x #-}
|
|
|
|
-- | Haskell type representing the C @float@ type.
|
|
FLOATING_TYPE(CFloat,tyConCFloat,"CFloat",HTYPE_FLOAT)
|
|
@@ -159,8 +158,7 @@
|
|
|
|
"realToFrac/CFloat->a" realToFrac = \(CFloat x) -> realToFrac x
|
|
"realToFrac/CDouble->a" realToFrac = \(CDouble x) -> realToFrac x
|
|
-"realToFrac/CLDouble->a" realToFrac = \(CLDouble x) -> realToFrac x
|
|
- #-}
|
|
+"realToFrac/CLDouble->a" realToFrac = \(CLDouble x) -> realToFrac x #-}
|
|
|
|
-- | Haskell type representing the C @ptrdiff_t@ type.
|
|
INTEGRAL_TYPE(CPtrdiff,tyConCPtrdiff,"CPtrdiff",HTYPE_PTRDIFF_T)
|
|
@@ -180,8 +178,7 @@
|
|
"fromIntegral/CPtrdiff->a" fromIntegral = \(CPtrdiff x) -> fromIntegral x
|
|
"fromIntegral/CSize->a" fromIntegral = \(CSize x) -> fromIntegral x
|
|
"fromIntegral/CWchar->a" fromIntegral = \(CWchar x) -> fromIntegral x
|
|
-"fromIntegral/CSigAtomic->a" fromIntegral = \(CSigAtomic x) -> fromIntegral x
|
|
- #-}
|
|
+"fromIntegral/CSigAtomic->a" fromIntegral = \(CSigAtomic x) -> fromIntegral x #-}
|
|
|
|
-- | Haskell type representing the C @clock_t@ type.
|
|
ARITHMETIC_TYPE(CClock,tyConCClock,"CClock",HTYPE_CLOCK_T)
|
|
@@ -205,8 +202,7 @@
|
|
"fromIntegral/a->CIntPtr" fromIntegral = \x -> CIntPtr (fromIntegral x)
|
|
"fromIntegral/a->CUIntPtr" fromIntegral = \x -> CUIntPtr (fromIntegral x)
|
|
"fromIntegral/a->CIntMax" fromIntegral = \x -> CIntMax (fromIntegral x)
|
|
-"fromIntegral/a->CUIntMax" fromIntegral = \x -> CUIntMax (fromIntegral x)
|
|
- #-}
|
|
+"fromIntegral/a->CUIntMax" fromIntegral = \x -> CUIntMax (fromIntegral x) #-}
|
|
|
|
-- C99 types which are still missing include:
|
|
-- wint_t, wctrans_t, wctype_t
|
|
|
|
|
|
--- packages/base/GHC/Int.hs.orig 2006-09-21 04:13:36.000000000 +0545
|
|
+++ packages/base/GHC/Int.hs 2022-08-09 02:38:19.000000000 +0545
|
|
@@ -134,8 +134,7 @@
|
|
{-# RULES
|
|
"fromIntegral/Int8->Int8" fromIntegral = id :: Int8 -> Int8
|
|
"fromIntegral/a->Int8" fromIntegral = \x -> case fromIntegral x of I# x# -> I8# (narrow8Int# x#)
|
|
-"fromIntegral/Int8->a" fromIntegral = \(I8# x#) -> fromIntegral (I# x#)
|
|
- #-}
|
|
+"fromIntegral/Int8->a" fromIntegral = \(I8# x#) -> fromIntegral (I# x#) #-}
|
|
|
|
------------------------------------------------------------------------
|
|
-- type Int16
|
|
@@ -241,8 +240,7 @@
|
|
"fromIntegral/Int8->Int16" fromIntegral = \(I8# x#) -> I16# x#
|
|
"fromIntegral/Int16->Int16" fromIntegral = id :: Int16 -> Int16
|
|
"fromIntegral/a->Int16" fromIntegral = \x -> case fromIntegral x of I# x# -> I16# (narrow16Int# x#)
|
|
-"fromIntegral/Int16->a" fromIntegral = \(I16# x#) -> fromIntegral (I# x#)
|
|
- #-}
|
|
+"fromIntegral/Int16->a" fromIntegral = \(I16# x#) -> fromIntegral (I# x#) #-}
|
|
|
|
------------------------------------------------------------------------
|
|
-- type Int32
|
|
@@ -391,8 +389,7 @@
|
|
"fromIntegral/Int32->Int" fromIntegral = \(I32# x#) -> I# (int32ToInt# x#)
|
|
"fromIntegral/Int32->Word" fromIntegral = \(I32# x#) -> W# (int2Word# (int32ToInt# x#))
|
|
"fromIntegral/Int32->Word32" fromIntegral = \(I32# x#) -> W32# (int32ToWord32# x#)
|
|
-"fromIntegral/Int32->Int32" fromIntegral = id :: Int32 -> Int32
|
|
- #-}
|
|
+"fromIntegral/Int32->Int32" fromIntegral = id :: Int32 -> Int32 #-}
|
|
|
|
#else
|
|
|
|
@@ -493,8 +490,7 @@
|
|
"fromIntegral/Int16->Int32" fromIntegral = \(I16# x#) -> I32# x#
|
|
"fromIntegral/Int32->Int32" fromIntegral = id :: Int32 -> Int32
|
|
"fromIntegral/a->Int32" fromIntegral = \x -> case fromIntegral x of I# x# -> I32# (narrow32Int# x#)
|
|
-"fromIntegral/Int32->a" fromIntegral = \(I32# x#) -> fromIntegral (I# x#)
|
|
- #-}
|
|
+"fromIntegral/Int32->a" fromIntegral = \(I32# x#) -> fromIntegral (I# x#) #-}
|
|
|
|
#endif
|
|
|
|
@@ -677,8 +673,7 @@
|
|
"fromIntegral/Int64->Int" fromIntegral = \(I64# x#) -> I# (int64ToInt# x#)
|
|
"fromIntegral/Int64->Word" fromIntegral = \(I64# x#) -> W# (int2Word# (int64ToInt# x#))
|
|
"fromIntegral/Int64->Word64" fromIntegral = \(I64# x#) -> W64# (int64ToWord64# x#)
|
|
-"fromIntegral/Int64->Int64" fromIntegral = id :: Int64 -> Int64
|
|
- #-}
|
|
+"fromIntegral/Int64->Int64" fromIntegral = id :: Int64 -> Int64 #-}
|
|
|
|
#else
|
|
|
|
@@ -763,8 +758,7 @@
|
|
|
|
{-# RULES
|
|
"fromIntegral/a->Int64" fromIntegral = \x -> case fromIntegral x of I# x# -> I64# x#
|
|
-"fromIntegral/Int64->a" fromIntegral = \(I64# x#) -> fromIntegral (I# x#)
|
|
- #-}
|
|
+"fromIntegral/Int64->a" fromIntegral = \(I64# x#) -> fromIntegral (I# x#) #-}
|
|
|
|
#endif
|
|
|
|
|
|
--- packages/base/GHC/Word.hs.orig 2006-09-21 04:13:33.000000000 +0545
|
|
+++ packages/base/GHC/Word.hs 2022-08-09 02:40:13.000000000 +0545
|
|
@@ -172,8 +172,7 @@
|
|
{-# RULES
|
|
"fromIntegral/Int->Word" fromIntegral = \(I# x#) -> W# (int2Word# x#)
|
|
"fromIntegral/Word->Int" fromIntegral = \(W# x#) -> I# (word2Int# x#)
|
|
-"fromIntegral/Word->Word" fromIntegral = id :: Word -> Word
|
|
- #-}
|
|
+"fromIntegral/Word->Word" fromIntegral = id :: Word -> Word #-}
|
|
|
|
------------------------------------------------------------------------
|
|
-- type Word8
|
|
@@ -271,8 +270,7 @@
|
|
"fromIntegral/Word8->Word8" fromIntegral = id :: Word8 -> Word8
|
|
"fromIntegral/Word8->Integer" fromIntegral = toInteger :: Word8 -> Integer
|
|
"fromIntegral/a->Word8" fromIntegral = \x -> case fromIntegral x of W# x# -> W8# (narrow8Word# x#)
|
|
-"fromIntegral/Word8->a" fromIntegral = \(W8# x#) -> fromIntegral (W# x#)
|
|
- #-}
|
|
+"fromIntegral/Word8->a" fromIntegral = \(W8# x#) -> fromIntegral (W# x#) #-}
|
|
|
|
------------------------------------------------------------------------
|
|
-- type Word16
|
|
@@ -371,8 +369,7 @@
|
|
"fromIntegral/Word16->Word16" fromIntegral = id :: Word16 -> Word16
|
|
"fromIntegral/Word16->Integer" fromIntegral = toInteger :: Word16 -> Integer
|
|
"fromIntegral/a->Word16" fromIntegral = \x -> case fromIntegral x of W# x# -> W16# (narrow16Word# x#)
|
|
-"fromIntegral/Word16->a" fromIntegral = \(W16# x#) -> fromIntegral (W# x#)
|
|
- #-}
|
|
+"fromIntegral/Word16->a" fromIntegral = \(W16# x#) -> fromIntegral (W# x#) #-}
|
|
|
|
------------------------------------------------------------------------
|
|
-- type Word32
|
|
@@ -492,8 +489,7 @@
|
|
"fromIntegral/Word->Word32" fromIntegral = \(W# x#) -> W32# (wordToWord32# x#)
|
|
"fromIntegral/Word32->Int" fromIntegral = \(W32# x#) -> I# (word2Int# (word32ToWord# x#))
|
|
"fromIntegral/Word32->Word" fromIntegral = \(W32# x#) -> W# (word32ToWord# x#)
|
|
-"fromIntegral/Word32->Word32" fromIntegral = id :: Word32 -> Word32
|
|
- #-}
|
|
+"fromIntegral/Word32->Word32" fromIntegral = id :: Word32 -> Word32 #-}
|
|
|
|
#else
|
|
|
|
@@ -598,8 +594,7 @@
|
|
"fromIntegral/Word32->Word32" fromIntegral = id :: Word32 -> Word32
|
|
"fromIntegral/Word32->Integer" fromIntegral = toInteger :: Word32 -> Integer
|
|
"fromIntegral/a->Word32" fromIntegral = \x -> case fromIntegral x of W# x# -> W32# (narrow32Word# x#)
|
|
-"fromIntegral/Word32->a" fromIntegral = \(W32# x#) -> fromIntegral (W# x#)
|
|
- #-}
|
|
+"fromIntegral/Word32->a" fromIntegral = \(W32# x#) -> fromIntegral (W# x#) #-}
|
|
|
|
#endif
|
|
|
|
@@ -765,8 +760,7 @@
|
|
"fromIntegral/Word->Word64" fromIntegral = \(W# x#) -> W64# (wordToWord64# x#)
|
|
"fromIntegral/Word64->Int" fromIntegral = \(W64# x#) -> I# (word2Int# (word64ToWord# x#))
|
|
"fromIntegral/Word64->Word" fromIntegral = \(W64# x#) -> W# (word64ToWord# x#)
|
|
-"fromIntegral/Word64->Word64" fromIntegral = id :: Word64 -> Word64
|
|
- #-}
|
|
+"fromIntegral/Word64->Word64" fromIntegral = id :: Word64 -> Word64 #-}
|
|
|
|
#else
|
|
|
|
@@ -851,8 +845,7 @@
|
|
|
|
{-# RULES
|
|
"fromIntegral/a->Word64" fromIntegral = \x -> case fromIntegral x of W# x# -> W64# x#
|
|
-"fromIntegral/Word64->a" fromIntegral = \(W64# x#) -> fromIntegral (W# x#)
|
|
- #-}
|
|
+"fromIntegral/Word64->a" fromIntegral = \(W64# x#) -> fromIntegral (W# x#) #-}
|
|
|
|
#endif
|
|
|