Skip to content

Commit

Permalink
Add ForeignPtr instnaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
TravisWhitaker committed Sep 21, 2019
1 parent c9d12bf commit 468fc06
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Control/DeepSeq.hs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ import Data.Monoid as Mon
import Data.Typeable ( TypeRep, TyCon )
import Data.Unique ( Unique )
import Foreign.Ptr
import Foreign.ForeignPtr
import Foreign.C.Types
import System.Exit ( ExitCode(..) )
import System.Mem.StableName ( StableName )
Expand Down Expand Up @@ -775,6 +776,16 @@ instance NFData (FunPtr a) where
instance NFData1 FunPtr where
liftRnf _ = rwhnf

----------------------------------------------------------------------------
-- Foreign.ForeignPtr

-- |@since 1.4.5.0
instance NFData (ForeignPtr a) where
rnf = rwhnf
-- |@since 1.4.5.0
instance NFData1 ForeignPtr where
liftRnf _ = rwhnf

----------------------------------------------------------------------------
-- Foreign.C.Types

Expand Down

0 comments on commit 468fc06

Please sign in to comment.