77-- | Orphan instances for GHC.
88-- Note that the 'NFData' instances may not be law abiding.
99module Development.IDE.GHC.Orphans () where
10- import Development.IDE.GHC.Compat
10+ import Development.IDE.GHC.Compat hiding
11+ (DuplicateRecordFields ,
12+ FieldSelectors )
1113import Development.IDE.GHC.Util
1214
1315import Control.DeepSeq
@@ -23,9 +25,10 @@ import GHC.Data.Bag
2325import GHC.Data.FastString
2426import qualified GHC.Data.StringBuffer as SB
2527import GHC.Parser.Annotation
26- import GHC.Types.SrcLoc
27-
28+ import GHC.Types.FieldLabel ( DuplicateRecordFields ( DuplicateRecordFields , NoDuplicateRecordFields ),
29+ FieldSelectors ( FieldSelectors , NoFieldSelectors ))
2830import GHC.Types.PkgQual
31+ import GHC.Types.SrcLoc
2932
3033-- See Note [Guidelines For Using CPP In GHCIDE Import Statements]
3134
@@ -237,3 +240,16 @@ instance NFData Extension where
237240
238241instance NFData (UniqFM Name [Name ]) where
239242 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