projects
/
ghc-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove an unused import
[ghc-base.git]
/
GHC
/
Exts.hs
diff --git
a/GHC/Exts.hs
b/GHC/Exts.hs
index
27fecae
..
bc36771
100644
(file)
--- a/
GHC/Exts.hs
+++ b/
GHC/Exts.hs
@@
-15,26
+15,30
@@
module GHC.Exts
(
-- * Representations of some basic types
module GHC.Exts
(
-- * Representations of some basic types
- Int(..),Word(..),Float(..),Double(..),Integer(..),Char(..),
- Ptr(..), FunPtr(..),
+ Int(..),Word(..),Float(..),Double(..),
+ Char(..),
+ Ptr(..), FunPtr(..),
+
+ -- * The maximum tuple size
+ maxTupleSize,
-- * Primitive operations
module GHC.Prim,
-- * Primitive operations
module GHC.Prim,
- shiftL#, shiftRL#, iShiftL#, iShiftRA#, iShiftRL#,
+ shiftL#, shiftRL#, iShiftL#, iShiftRA#, iShiftRL#,
uncheckedShiftL64#, uncheckedShiftRL64#,
uncheckedIShiftL64#, uncheckedIShiftRA64#,
uncheckedShiftL64#, uncheckedShiftRL64#,
uncheckedIShiftL64#, uncheckedIShiftRA64#,
- -- * Fusion
- build, augment,
+ -- * Fusion
+ build, augment,
- -- * Overloaded string literals
- IsString(..),
+ -- * Overloaded string literals
+ IsString(..),
- -- * Debugging
- breakpoint, breakpointCond,
+ -- * Debugging
+ breakpoint, breakpointCond,
- -- * Ids with special behaviour
- lazy, inline,
+ -- * Ids with special behaviour
+ lazy, inline,
-- * Transform comprehensions
Down(..), groupWith, sortWith, the
-- * Transform comprehensions
Down(..), groupWith, sortWith, the
@@
-47,12
+51,15
@@
import GHC.Prim
import GHC.Base
import GHC.Word
import GHC.Int
import GHC.Base
import GHC.Word
import GHC.Int
-import GHC.Num
import GHC.Float
import GHC.Ptr
import Data.String
import Data.List
import GHC.Float
import GHC.Ptr
import Data.String
import Data.List
+-- XXX This should really be in Data.Tuple, where the definitions are
+maxTupleSize :: Int
+maxTupleSize = 62
+
-- | The 'Down' type allows you to reverse sort order conveniently. A value of type
-- @'Down' a@ contains a value of type @a@ (represented as @'Down' a@).
-- If @a@ has an @'Ord'@ instance associated with it then comparing two
-- | The 'Down' type allows you to reverse sort order conveniently. A value of type
-- @'Down' a@ contains a value of type @a@ (represented as @'Down' a@).
-- If @a@ has an @'Ord'@ instance associated with it then comparing two
@@
-67,7
+74,7
@@
instance Ord a => Ord (Down a) where
-- | 'the' ensures that all the elements of the list are identical
-- and then returns that unique element
the :: Eq a => [a] -> a
-- | 'the' ensures that all the elements of the list are identical
-- and then returns that unique element
the :: Eq a => [a] -> a
-the (x:xs)
+the (x:xs)
| all (x ==) xs = x
| otherwise = error "GHC.Exts.the: non-identical elements"
the [] = error "GHC.Exts.the: empty list"
| all (x ==) xs = x
| otherwise = error "GHC.Exts.the: non-identical elements"
the [] = error "GHC.Exts.the: empty list"