#ifdef __GLASGOW_HASKELL__ #if !defined(__PARALLEL_HASKELL__) #endif #endif module System.Mem.StableName ( StableName, makeStableName, hashStableName, ) where import Prelude import Data.Typeable #ifdef __HUGS__ import Hugs.Stable #endif #ifdef __GLASGOW_HASKELL__ import GHC.IO ( IO(..) ) import GHC.Base ( Int(..), StableName#, makeStableName# , eqStableName#, stableNameToInt# ) data StableName a = StableName (StableName# a) makeStableName :: a -> IO (StableName a) #if defined(__PARALLEL_HASKELL__) makeStableName a = error "makeStableName not implemented in parallel Haskell" #else makeStableName a = IO $ \ s -> case makeStableName# a s of (# s', sn #) -> (# s', StableName sn #) #endif hashStableName :: StableName a -> Int #if defined(__PARALLEL_HASKELL__) hashStableName (StableName sn) = error "hashStableName not implemented in parallel Haskell" #else hashStableName (StableName sn) = I# (stableNameToInt# sn) #endif instance Eq (StableName a) where #if defined(__PARALLEL_HASKELL__) (StableName sn1) == (StableName sn2) = error "eqStableName not implemented in parallel Haskell" #else (StableName sn1) == (StableName sn2) = case eqStableName# sn1 sn2 of 0# -> False _ -> True #endif #endif /* __GLASGOW_HASKELL__ */ #include "Typeable.h" INSTANCE_TYPEABLE1(StableName,stableNameTc,"StableName")
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4