X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Data%2FTypeable.hs;h=804e853b8de6aec58f024901f498eda4b0b4c127;hb=41e8fba828acbae1751628af50849f5352b27873;hp=40d07aced4a07d73b9305e07f2a707cdb1ed0ea3;hpb=171fcc3ed2f927bd571643d2d27e44d0d72f1d8d;p=ghc-base.git diff --git a/Data/Typeable.hs b/Data/Typeable.hs index 40d07ac..804e853 100644 --- a/Data/Typeable.hs +++ b/Data/Typeable.hs @@ -1,4 +1,11 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -XOverlappingInstances -funbox-strict-fields #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , OverlappingInstances + , ScopedTypeVariables + , ForeignFunctionInterface + , FlexibleInstances + #-} +{-# OPTIONS_GHC -funbox-strict-fields #-} -- The -XOverlappingInstances flag allows the user to over-ride -- the instances for Typeable given here. In particular, we provide an instance @@ -93,10 +100,10 @@ import GHC.Base import GHC.Show (Show(..), ShowS, shows, showString, showChar, showParen) import GHC.Err (undefined) -import GHC.Num (Integer, fromInteger, (+)) +import GHC.Num (Integer, (+)) import GHC.Real ( rem, Ratio ) import GHC.IORef (IORef,newIORef) -import GHC.IO (unsafePerformIO,block) +import GHC.IO (unsafePerformIO,mask_) -- These imports are so we can define Typeable instances -- It'd be better to give Typeable instances in the modules themselves @@ -681,7 +688,7 @@ cache = unsafePerformIO $ do tc_tbl = empty_tc_tbl, ap_tbl = empty_ap_tbl } #ifdef __GLASGOW_HASKELL__ - block $ do + mask_ $ do stable_ref <- newStablePtr ret let ref = castStablePtrToPtr stable_ref ref2 <- getOrSetTypeableStore ref