[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / lib / hbc / Hash_mt.hi
1 {-# GHC_PRAGMA INTERFACE VERSION 5 #-}
2 interface Hash where
3 import PreludeArray(Array, Assoc)
4 import PreludeComplex(Complex)
5 import PreludeIO(IOError, Request, Response)
6 import PreludeRatio(Ratio(..))
7 class Hashable a where
8         hash :: a -> Int
9          {-# GHC_PRAGMA {-meth-} _A_ 1 _U_ 12 _N_ _S_ "S" _F_ _IF_ARGS_ 1 1 X 1 _/\_ u0 -> \ (u1 :: u0 -> Int) -> u1 _N_
10                 {-defm-} _A_ 2 _U_ 02 _N_ _S_ _!_ _F_ _IF_ARGS_ 1 2 XX 3 _/\_ u0 -> \ (u1 :: {{Hashable u0}}) (u2 :: u0) -> _APP_  _TYAPP_  patError# { (u0 -> Int) } [ _NOREP_S_ "%DHash.Hashable.hash\"", u2 ] _N_ #-}
11 hashToMax :: Hashable a => Int -> a -> Int
12         {-# GHC_PRAGMA _A_ 3 _U_ 122 _N_ _S_ "SLL" _N_ _N_ #-}
13 instance Hashable ()
14         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 1 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 1 _CONSTM_ Hashable hash (()) _N_
15          hash = _A_ 1 _U_ 0 _N_ _S_ "A" {_A_ 0 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 2 _!_ I# [] [0#] _N_} _F_ _IF_ARGS_ 0 1 X 2 \ (u0 :: ()) -> _!_ I# [] [0#] _N_ #-}
16 instance (Hashable a, Hashable b) => Hashable (a, b)
17         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 3 _U_ 22 _N_ _S_ "SSS" _N_ _N_ #-}
18 instance (Hashable a, Hashable b, Hashable c) => Hashable (a, b, c)
19         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 4 _U_ 222 _N_ _S_ "SSSU(LLL)" _N_ _N_ #-}
20 instance (Hashable a, Hashable b, Hashable c, Hashable d) => Hashable (a, b, c, d)
21         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 5 _U_ 2222 _N_ _S_ "SSSSU(LLLL)" _N_ _N_ #-}
22 instance (Hashable a, Hashable b, Hashable c, Hashable d, Hashable e) => Hashable (a, b, c, d, e)
23         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 6 _U_ 22222 _N_ _S_ "SSSSSU(LLLLL)" _N_ _N_ #-}
24 instance Hashable (a -> b)
25         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 1 _N_ _N_ _N_ _F_ _IF_ARGS_ 2 1 X 2 _/\_ u0 u1 -> \ (u2 :: u0 -> u1) -> _!_ I# [] [0#] _N_ #-}
26 instance Ix a => Hashable (Array a b)
27         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 2 _U_ 2 _N_ _N_ _F_ _IF_ARGS_ 2 2 XX 2 _/\_ u0 u1 -> \ (u2 :: {{Ix u0}}) (u3 :: Array u0 u1) -> _!_ I# [] [0#] _N_ #-}
28 instance (Hashable a, Hashable b) => Hashable (Assoc a b)
29         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 3 _U_ 22 _N_ _S_ "SSS" _N_ _N_ #-}
30 instance Hashable Bin
31         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 1 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 1 _CONSTM_ Hashable hash (Bin) _N_
32          hash = _A_ 1 _U_ 0 _N_ _S_ "A" {_A_ 0 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 2 _!_ I# [] [0#] _N_} _F_ _IF_ARGS_ 0 1 X 2 \ (u0 :: Bin) -> _!_ I# [] [0#] _N_ #-}
33 instance Hashable Bool
34         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 1 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 1 _CONSTM_ Hashable hash (Bool) _N_
35          hash = _A_ 1 _U_ 1 _N_ _S_ "E" _F_ _IF_ARGS_ 0 1 C 6 \ (u0 :: Bool) -> case u0 of { _ALG_ False  -> _!_ I# [] [0#]; True  -> _!_ I# [] [1#]; _NO_DEFLT_ } _N_ #-}
36 instance Hashable Char
37         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 1 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 1 _CONSTM_ Hashable hash (Char) _N_
38          hash = _A_ 1 _U_ 1 _N_ _S_ "U(P)" {_A_ 1 _U_ 2 _N_ _N_ _F_ _IF_ARGS_ 0 1 X 3 \ (u0 :: Char#) -> case _#_ ord# [] [u0] of { _PRIM_ (u1 :: Int#) -> _!_ I# [] [u1] } _N_} _F_ _IF_ARGS_ 0 1 C 4 \ (u0 :: Char) -> case u0 of { _ALG_ C# (u1 :: Char#) -> case _#_ ord# [] [u1] of { _PRIM_ (u2 :: Int#) -> _!_ I# [] [u2] }; _NO_DEFLT_ } _N_ #-}
39 instance (RealFloat a, Hashable a) => Hashable (Complex a)
40         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 3 _U_ 22 _N_ _S_ "LSS" _N_ _N_ #-}
41 instance Hashable Double
42         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 0 _N_ _N_ _N_ _N_ _N_
43          hash = _A_ 0 _U_ 2 _N_ _N_ _N_ _N_ #-}
44 instance Hashable Float
45         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 0 _N_ _N_ _N_ _N_ _N_
46          hash = _A_ 0 _U_ 2 _N_ _N_ _N_ _N_ #-}
47 instance Hashable IOError
48         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 1 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 1 _CONSTM_ Hashable hash (IOError) _N_
49          hash = _A_ 1 _U_ 0 _N_ _S_ "A" {_A_ 0 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 2 _!_ I# [] [0#] _N_} _F_ _IF_ARGS_ 0 1 X 2 \ (u0 :: IOError) -> _!_ I# [] [0#] _N_ #-}
50 instance Hashable Int
51         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 1 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 1 _CONSTM_ Hashable hash (Int) _N_
52          hash = _A_ 1 _U_ 1 _N_ _S_ "U(P)" {_A_ 1 _U_ 2 _N_ _N_ _F_ _IF_ARGS_ 0 1 X 2 \ (u0 :: Int#) -> _!_ I# [] [u0] _N_} _F_ _IF_ARGS_ 0 1 X 1 \ (u0 :: Int) -> u0 _N_ #-}
53 instance Hashable Integer
54         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 1 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 1 _CONSTM_ Hashable hash (Integer) _N_
55          hash = _A_ 1 _U_ 1 _N_ _S_ "U(PPP)" {_A_ 3 _U_ 222 _N_ _N_ _F_ _IF_ARGS_ 0 3 XXX 3 \ (u0 :: Int#) (u1 :: Int#) (u2 :: ByteArray#) -> case _#_ integer2Int# [] [u0, u1, u2] of { _PRIM_ (u3 :: Int#) -> _!_ I# [] [u3] } _N_} _F_ _IF_ARGS_ 0 1 C 4 \ (u0 :: Integer) -> case u0 of { _ALG_ J# (u1 :: Int#) (u2 :: Int#) (u3 :: ByteArray#) -> case _#_ integer2Int# [] [u1, u2, u3] of { _PRIM_ (u4 :: Int#) -> _!_ I# [] [u4] }; _NO_DEFLT_ } _N_ #-}
56 instance (Integral a, Hashable a) => Hashable (Ratio a)
57         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 3 _U_ 22 _N_ _S_ "LSL" _N_ _N_ #-}
58 instance Hashable Request
59         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 1 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 1 _CONSTM_ Hashable hash (Request) _N_
60          hash = _A_ 1 _U_ 0 _N_ _S_ "A" {_A_ 0 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 2 _!_ I# [] [0#] _N_} _F_ _IF_ARGS_ 0 1 X 2 \ (u0 :: Request) -> _!_ I# [] [0#] _N_ #-}
61 instance Hashable Response
62         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 1 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 1 _CONSTM_ Hashable hash (Response) _N_
63          hash = _A_ 1 _U_ 0 _N_ _S_ "A" {_A_ 0 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 2 _!_ I# [] [0#] _N_} _F_ _IF_ARGS_ 0 1 X 2 \ (u0 :: Response) -> _!_ I# [] [0#] _N_ #-}
64 instance Hashable a => Hashable [a]
65         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 2 _U_ 2 _N_ _S_ "LS" _N_ _N_ #-}
66 instance Hashable [Char]
67         {-# GHC_PRAGMA _M_ Hash {-dfun-} _A_ 1 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 1 _CONSTM_ Hashable hash ([Char]) _N_
68          hash = _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-}
69