Allow building on deepseq < 1.4.2.0

This commit is contained in:
Vidar Holen 2022-12-11 15:05:33 -08:00
parent 74b1745a19
commit 3cae6cd6ab
1 changed files with 8 additions and 0 deletions
src/ShellCheck

View File

@ -20,6 +20,7 @@
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE DeriveAnyClass, DeriveGeneric #-}
{-# LANGUAGE CPP #-}
{-
Data Flow Analysis on a Control Flow Graph.
@ -433,6 +434,13 @@ data StackEntry s = StackEntry {
}
deriving (Eq, Generic, NFData)
#if MIN_VERSION_deepseq(1,4,2)
-- Our deepseq already has a STRef instance
#else
-- Older deepseq (for GHC < 8) lacks this instance
instance NFData (STRef s a) where
rnf = (`seq` ())
#endif
-- Overwrite a base state with the contents of a diff state
-- This is unrelated to join/merge.