Remove unnecessary NFData constraints/instances

This commit is contained in:
Rob Dockins 2020-03-05 16:53:41 -08:00
parent ce06a16d13
commit df4332ea48
3 changed files with 3 additions and 13 deletions

View File

@ -27,7 +27,6 @@ import qualified Data.Map.Strict as Map
import Data.Semigroup
import GHC.Generics (Generic)
import Control.DeepSeq
import Prelude ()
import Prelude.Compat
@ -37,7 +36,7 @@ import Prelude.Compat
data GenEvalEnv sym = EvalEnv
{ envVars :: !(Map.Map Name (Eval (GenValue sym)))
, envTypes :: !TypeEnv
} deriving (Generic, NFData)
} deriving Generic
instance Semigroup (GenEvalEnv sym) where
l <> r = EvalEnv

View File

@ -93,9 +93,6 @@ lookupSeqMap (UpdateSeqMap m f) i =
type SeqValMap = SeqMap ()
instance NFData (SeqMap sym) where
rnf x = seq x ()
-- | Generate a finite sequence map from a list of values
finiteSeqMap :: [Eval (GenValue sym)] -> SeqMap sym
finiteSeqMap xs =
@ -203,9 +200,6 @@ data WordValue sym
-- 'SeqMap' of bits.
deriving (Generic)
deriving instance BitWord sym => NFData (WordValue sym)
-- | An arbitrarily-chosen number of elements where we switch from a dense
-- sequence representation of bit-level words to 'SeqMap' representation.
largeBitSize :: Integer
@ -299,7 +293,7 @@ data GenValue sym
| VFun (Eval (GenValue sym) -> Eval (GenValue sym)) -- ^ functions
| VPoly (TValue -> Eval (GenValue sym)) -- ^ polymorphic values (kind *)
| VNumPoly (Nat' -> Eval (GenValue sym)) -- ^ polymorphic values (kind #)
deriving (Generic, NFData)
deriving Generic
-- | Force the evaluation of a word value
@ -434,7 +428,6 @@ ppBV opts (BV width i)
-- are necessary to define generic evaluator primitives that operate on both concrete
-- and symbolic values uniformly.
class ( Show (SBit sym), Show (SWord sym), Show (SInteger sym)
, NFData (SBit sym), NFData (SWord sym), NFData (SInteger sym)
) => BitWord sym where
type SBit sym :: Type
type SWord sym :: Type

View File

@ -88,8 +88,6 @@ data ModuleEnv = ModuleEnv
} deriving Generic
instance NFData ModuleEnv
-- | Should we run the linter?
data CoreLint = NoCoreLint -- ^ Don't run core lint
| CoreLint -- ^ Run core lint
@ -347,7 +345,7 @@ data DynamicEnv = DEnv
{ deNames :: R.NamingEnv
, deDecls :: [T.DeclGroup]
, deEnv :: EvalEnv
} deriving (Generic, NFData)
} deriving Generic
instance Semigroup DynamicEnv where
de1 <> de2 = DEnv