X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Flib%2Fprelude%2FITup5.hs;fp=ghc%2Flib%2Fprelude%2FITup5.hs;h=12f031129ef723d5743942a06086e793339346f3;hb=68a1f0233996ed79824d11d946e9801473f6946c;hp=223e297f8316b450a9762c6ba428412ff4f9472d;hpb=ed7464364646a28aaf27d1dbc2ceaf7a9d9ce62f;p=ghc-hetmet.git diff --git a/ghc/lib/prelude/ITup5.hs b/ghc/lib/prelude/ITup5.hs index 223e297..12f0311 100644 --- a/ghc/lib/prelude/ITup5.hs +++ b/ghc/lib/prelude/ITup5.hs @@ -11,6 +11,8 @@ import List ( (++), foldr ) import Prel ( (&&), (.) ) import PS ( _PackedString, _unpackPS ) import Text +import TyArray +import TyComplex instance (Eq a, Eq b, Eq c, Eq d, Eq e) => Eq (a,b,c,d,e) where (a1,a2,a3,a4,a5) == (b1,b2,b3,b4,b5) = a1 == b1 && a2 == b2 && a3 == b3 && a4 == b4 && a5 == b5 @@ -70,40 +72,26 @@ instance (Ix a1, Ix a2, Ix a3, Ix a4, Ix a5) => Ix (a1,a2,a3,a4,a5) where instance (Text a, Text b, Text c, Text d, Text e) => Text (a, b, c, d, e) where readsPrec p = readParen False (\a -> [((w,x,y,z,v), l) | ("(",b) <- lex a, - (w,c) <- reads b, + (w,c) <- readsPrec 0 b, (",",d) <- lex c, - (x,e) <- reads d, + (x,e) <- readsPrec 0 d, (",",f) <- lex e, - (y,g) <- reads f, + (y,g) <- readsPrec 0 f, (",",h) <- lex g, - (z,i) <- reads h, + (z,i) <- readsPrec 0 h, (",",j) <- lex i, - (v,k) <- reads j, + (v,k) <- readsPrec 0 j, (")",l) <- lex k ] ) - showsPrec p (v,w,x,y,z) = showChar '(' . shows v . showString ", " . - shows w . showString ", " . - shows x . showString ", " . - shows y . showString ", " . - shows z . showChar ')' + showsPrec p (v,w,x,y,z) = showChar '(' . showsPrec 0 v . showString ", " . + showsPrec 0 w . showString ", " . + showsPrec 0 x . showString ", " . + showsPrec 0 y . showString ", " . + showsPrec 0 z . showChar ')' -#if defined(__UNBOXED_INSTANCES__) + readList = _readList (readsPrec 0) + showList = _showList (showsPrec 0) --- We only create SPECIALIZED instances unboxed tuples --- which have all the same unboxed component --- {-# SPECIALIZE instance Eq (Char#,Char#,Char#,Char#,Char#) #-} --- {-# SPECIALIZE instance Ord (Char#,Char#,Char#,Char#,Char#) #-} --- {-# SPECIALIZE instance Ix (Char#,Char#,Char#,Char#,Char#) #-} --- {-# SPECIALIZE instance Text (Char#,Char#,Char#,Char#,Char#) #-} - --- {-# SPECIALIZE instance Eq (Int#,Int#,Int#,Int#,Int#) #-} --- {-# SPECIALIZE instance Ord (Int#,Int#,Int#,Int#,Int#) #-} --- {-# SPECIALIZE instance Ix (Int#,Int#,Int#,Int#,Int#) #-} --- {-# SPECIALIZE instance Text (Int#,Int#,Int#,Int#,Int#) #-} - --- {-# SPECIALIZE instance Eq (Double#,Double#,Double#,Double#,Double#) #-} --- {-# SPECIALIZE instance Ord (Double#,Double#,Double#,Double#,Double#) #-} --- {-# SPECIALIZE instance Text (Double#,Double#,Double#,Double#,Double#) #-} - -#endif +{-# SPECIALIZE instance Eq (Int,Int,Int,Int,Int) #-} +{-# SPECIALIZE instance Ord (Int,Int,Int,Int,Int) #-}