7
7
-- | Orphan instances for GHC.
8
8
-- Note that the 'NFData' instances may not be law abiding.
9
9
module Development.IDE.GHC.Orphans () where
10
- import Development.IDE.GHC.Compat
10
+ import Development.IDE.GHC.Compat hiding
11
+ (DuplicateRecordFields ,
12
+ FieldSelectors )
11
13
import Development.IDE.GHC.Util
12
14
13
15
import Control.DeepSeq
@@ -23,9 +25,10 @@ import GHC.Data.Bag
23
25
import GHC.Data.FastString
24
26
import qualified GHC.Data.StringBuffer as SB
25
27
import GHC.Parser.Annotation
26
- import GHC.Types.SrcLoc
27
-
28
+ import GHC.Types.FieldLabel ( DuplicateRecordFields ( DuplicateRecordFields , NoDuplicateRecordFields ),
29
+ FieldSelectors ( FieldSelectors , NoFieldSelectors ))
28
30
import GHC.Types.PkgQual
31
+ import GHC.Types.SrcLoc
29
32
30
33
-- See Note [Guidelines For Using CPP In GHCIDE Import Statements]
31
34
@@ -237,3 +240,16 @@ instance NFData Extension where
237
240
238
241
instance NFData (UniqFM Name [Name ]) where
239
242
rnf (ufmToIntMap -> m) = rnf m
243
+
244
+ #if !MIN_VERSION_ghc(9,5,0)
245
+ instance NFData DuplicateRecordFields where
246
+ rnf DuplicateRecordFields = ()
247
+ rnf NoDuplicateRecordFields = ()
248
+
249
+ instance NFData FieldSelectors where
250
+ rnf FieldSelectors = ()
251
+ rnf NoFieldSelectors = ()
252
+
253
+ instance NFData FieldLabel where
254
+ rnf (FieldLabel a b c d) = rnf a `seq` rnf b `seq` rnf c `seq` rnf d
255
+ #endif
0 commit comments