Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Data/Primitive/Array.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{-# LANGUAGE CPP, MagicHash, UnboxedTuples, DeriveDataTypeable, BangPatterns #-}
{-# LANGUAGE CPP, MagicHash, UnboxedTuples, BangPatterns #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TemplateHaskellQuotes #-}
Expand Down Expand Up @@ -64,7 +64,6 @@ import Language.Haskell.TH.Syntax (Lift (..))
-- | Boxed arrays.
data Array a = Array
{ array# :: Array# a }
deriving ( Typeable )

instance Lift a => Lift (Array a) where
#if MIN_VERSION_template_haskell(2,16,0)
Expand Down Expand Up @@ -107,7 +106,6 @@ instance NFData a => NFData (Array a) where
-- | Mutable boxed arrays associated with a primitive state token.
data MutableArray s a = MutableArray
{ marray# :: MutableArray# s a }
deriving ( Typeable )

-- | The number of elements in an immutable array.
sizeofArray :: Array a -> Int
Expand Down
4 changes: 1 addition & 3 deletions Data/Primitive/MutVar.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{-# LANGUAGE MagicHash, UnboxedTuples, DeriveDataTypeable, CPP #-}
{-# LANGUAGE MagicHash, UnboxedTuples, CPP #-}

-- |
-- Module : Data.Primitive.MutVar
Expand Down Expand Up @@ -37,12 +37,10 @@ import GHC.STRef (STRef(STRef))
import GHC.Exts ( MutVar#, sameMutVar#, newMutVar#
, readMutVar#, writeMutVar#, atomicModifyMutVar#
, isTrue#, RealWorld)
import Data.Typeable ( Typeable )

-- | A 'MutVar' behaves like a single-element mutable array associated
-- with a primitive state token.
data MutVar s a = MutVar (MutVar# s a)
deriving ( Typeable )

instance Eq (MutVar s a) where
MutVar mva# == MutVar mvb# = isTrue# (sameMutVar# mva# mvb#)
Expand Down
3 changes: 0 additions & 3 deletions Data/Primitive/SmallArray.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE TemplateHaskellQuotes #-}

Expand Down Expand Up @@ -93,7 +92,6 @@ import Data.Functor.Classes (Eq1(..), Ord1(..), Show1(..), Read1(..))
import Language.Haskell.TH.Syntax (Lift(..))

data SmallArray a = SmallArray (SmallArray# a)
deriving Typeable

#if MIN_VERSION_deepseq(1,4,3)
instance NFData1 SmallArray where
Expand All @@ -104,7 +102,6 @@ instance NFData a => NFData (SmallArray a) where
rnf = foldl' (\_ -> rnf) ()

data SmallMutableArray s a = SmallMutableArray (SmallMutableArray# s a)
deriving Typeable

instance Lift a => Lift (SmallArray a) where
#if MIN_VERSION_template_haskell(2,16,0)
Expand Down
2 changes: 1 addition & 1 deletion primitive.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Library
Default-Extensions:
TypeOperators
Other-Extensions:
BangPatterns, CPP, DeriveDataTypeable,
BangPatterns, CPP,
MagicHash, TypeFamilies, UnboxedTuples, UnliftedFFITypes

Exposed-Modules:
Expand Down
Loading