X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Flib%2Fprelude%2FIList.hs;h=38eca7e2389395555d43b83aafd344787f828ec9;hb=68a1f0233996ed79824d11d946e9801473f6946c;hp=1b981d250c40dbb9fb64567ac81d2151d0762350;hpb=10521d8418fd3a1cf32882718b5bd28992db36fd;p=ghc-hetmet.git diff --git a/ghc/lib/prelude/IList.hs b/ghc/lib/prelude/IList.hs index 1b981d2..38eca7e 100644 --- a/ghc/lib/prelude/IList.hs +++ b/ghc/lib/prelude/IList.hs @@ -1,13 +1,21 @@ module PreludeBuiltin where -import Prel ( (&&) ) +import Prel ( (&&), atan2 ) import Cls import Core +import IBool import IChar +import IComplex +import IDouble +import IFloat import IInt +import IInteger +import ITup2 import List ( (++) ) import PS ( _PackedString, _unpackPS ) import Text +import TyArray +import TyComplex instance (Eq a) => Eq [a] where [] == [] = True @@ -34,30 +42,66 @@ instance (Ord a) => Ord [a] where _EQ -> _tagCmp xs ys instance (Text a) => Text [a] where - readsPrec p = readList - showsPrec p = showList + readsPrec p = readList + showsPrec p xs = showList xs + readList = _readList (readsPrec 0) + showList = _showList (showsPrec 0) {-# SPECIALIZE instance Eq [Char] #-} {-# SPECIALIZE instance Ord [Char] #-} {-# SPECIALIZE instance Text [Char] #-} +{-# SPECIALIZE instance Eq [Int] #-} +{-# SPECIALIZE instance Ord [Int] #-} +{-# SPECIALIZE instance Text [Int] #-} + +{-# SPECIALIZE instance Eq [Integer] #-} +{-# SPECIALIZE instance Ord [Integer] #-} +{-# SPECIALIZE instance Text [Integer] #-} + +--NO:{-# SPECIALIZE instance Eq [Float] #-} +--NO:{-# SPECIALIZE instance Ord [Float] #-} +--NO:{-# SPECIALIZE instance Text [Float] #-} + +{-# SPECIALIZE instance Eq [Double] #-} +{-# SPECIALIZE instance Ord [Double] #-} +{-# SPECIALIZE instance Text [Double] #-} + +{-# SPECIALIZE instance Eq [Bool] #-} +{-# SPECIALIZE instance Ord [Bool] #-} +{-# SPECIALIZE instance Text [Bool] #-} + +{-# SPECIALIZE instance Eq [[Char]] #-} +{-# SPECIALIZE instance Ord [[Char]] #-} +{-# SPECIALIZE instance Text [[Char]] #-} + +{-# SPECIALIZE instance Eq [[Int]] #-} +{-# SPECIALIZE instance Ord [[Int]] #-} +{-# SPECIALIZE instance Text [[Int]] #-} + +{-# SPECIALIZE instance Eq [Complex Double] #-} +{-# SPECIALIZE instance Text [Complex Double] #-} + +{-# SPECIALIZE instance Eq [(Int,Int)] #-} + #if defined(__OVERLAPPING_INSTANCES__) instance _CCallable [Char] instance _CReturnable [Char] #endif -{-# SPECIALIZE instance Eq [Int] #-} -{-# SPECIALIZE instance Ord [Int] #-} -{-# SPECIALIZE instance Text [Int] #-} - - #if defined(__UNBOXED_INSTANCES__) {-# GENERATE_SPECS instance a :: Eq [a] #-} {-# GENERATE_SPECS instance a :: Ord [a] #-} {-# GENERATE_SPECS instance a :: Text [a] #-} +#if defined(__OVERLAPPING_INSTANCES__) instance _CCallable [Char#] instance _CReturnable [Char#] +#endif #endif + + + +